Skip to content

Commit

Permalink
Dev/update (cresset-template#88)
Browse files Browse the repository at this point in the history
* Fix grep expression to find avx2 to use the `q` flag.

* Add testing README.

* Merge multiple custom aliasing layers into a single layer.

* Place tmux installation back in the conda installation with fixed version number for consistent behavior.
  • Loading branch information
veritas9872 authored Mar 10, 2023
1 parent c3ac5a7 commit 478ef1d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ RUN $conda install -y libjpeg-turbo zlib && conda clean -ya
# Specify `Pillow-SIMD` version if necessary. Variable is not used yet.
ARG PILLOW_SIMD_VERSION
# Condition ensures that AVX2 instructions are built only if available.
RUN if [ -n "$(lscpu | grep avx2)" ]; then CC="cc -mavx2"; fi && \
RUN if [ ! "$(lscpu | grep -q avx2)" ]; then CC="cc -mavx2"; fi && \
python -m pip wheel --no-deps --wheel-dir /tmp/dist \
Pillow-SIMD # ==${PILLOW_SIMD_VERSION}

Expand Down Expand Up @@ -507,12 +507,13 @@ COPY --link --from=train-builds --chown=${UID}:${GID} \
/opt/zsh/zsh-syntax-highlighting ${ZSHS_PATH}
RUN echo "source ${ZSHS_PATH}/zsh-syntax-highlighting.zsh" >> ${HOME}/.zshrc

# Add custom aliases and settings.
# Add `ll` alias for convenience. The Mac version of `ll` is used
# instead of the Ubuntu version due to better configurability.
RUN echo "alias ll='ls -lh'" >> ${HOME}/.zshrc

# Add `wns` as an alias for `watch nvidia-smi`, which is used often.
RUN echo "alias wns='watch nvidia-smi'" >> ${HOME}/.zshrc
RUN { echo "alias ll='ls -lh'"; \
echo "alias wns='watch nvidia-smi'"; \
} >> ${HOME}/.zshrc

# `PROJECT_ROOT` belongs to `USR` if created after `USER` has been set.
# Not so for pre-existing directories, which will still belong to root.
Expand Down
1 change: 0 additions & 1 deletion reqs/apt-train.requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
# `sudo` and `zsh` are required packages.
at
sudo
tmux
watchman # For pyre-check only.
zsh
1 change: 1 addition & 0 deletions reqs/train-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies: # Use conda packages if possible.
- pytype
- rsync
- shellcheck
- tmux==3.2a
- tree

# For `pip` dependencies that are not available in conda.
Expand Down
7 changes: 7 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Tests

This is the directory for tests.
PyTest is the recommended testing platform.

Unit tests should preferably be written as doctests,
with more advanced tests being placed in this directory.

0 comments on commit 478ef1d

Please sign in to comment.