diff --git a/Dockerfile b/Dockerfile index ed4769a..3641338 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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} @@ -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. diff --git a/reqs/apt-train.requirements.txt b/reqs/apt-train.requirements.txt index b5bd0aa..58ed6bd 100644 --- a/reqs/apt-train.requirements.txt +++ b/reqs/apt-train.requirements.txt @@ -2,6 +2,5 @@ # `sudo` and `zsh` are required packages. at sudo -tmux watchman # For pyre-check only. zsh diff --git a/reqs/train-environment.yaml b/reqs/train-environment.yaml index 8f943cc..e23cd5f 100644 --- a/reqs/train-environment.yaml +++ b/reqs/train-environment.yaml @@ -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. diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..d2a1664 --- /dev/null +++ b/tests/README.md @@ -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.