Skip to content

Commit

Permalink
Improve Dockerfiles codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Aug 19, 2024
1 parent 7f8cdf8 commit 5ea1adb
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions images/base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ RUN apt-get update --yes && \

USER ${NB_UID}

# Install JupyterLab, Jupyter Notebook, JupyterHub and NBClassic
# Install JupyterHub, JupyterLab, NBClassic and Jupyter Notebook
# Generate a Jupyter Server config
# Cleanup temporary files
# Correct permissions
# Do all this in a single RUN command to avoid duplicating all of the
# files across image layers when the permissions change
WORKDIR /tmp
RUN mamba install --yes \
'jupyterlab' \
'notebook' \
'jupyterhub' \
'nbclassic' && \
'jupyterlab' \
'nbclassic' \
'notebook' && \
jupyter server --generate-config && \
mamba clean --all -f -y && \
npm cache clean --force && \
Expand Down
4 changes: 2 additions & 2 deletions images/docker-stacks-foundation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ RUN set -x && \
--root-prefix="${CONDA_DIR}" \
--prefix="${CONDA_DIR}" \
--yes \
"${PYTHON_SPECIFIER}" \
'jupyter_core' \
'mamba' \
'jupyter_core' && \
"${PYTHON_SPECIFIER}" && \
rm -rf /tmp/bin/ && \
# Pin major.minor version of python
# https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#preventing-packages-from-updating-pinning
Expand Down
4 changes: 2 additions & 2 deletions images/pytorch-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3013
RUN pip install --no-cache-dir --index-url 'https://download.pytorch.org/whl/cpu' \
'torch' \
'torchvision' \
'torchaudio' && \
'torchaudio' \
'torchvision' && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
4 changes: 2 additions & 2 deletions images/pytorch-notebook/cuda11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3013
RUN pip install --no-cache-dir --extra-index-url=https://pypi.nvidia.com --index-url 'https://download.pytorch.org/whl/cu118' \
'torch' \
'torchvision' \
'torchaudio' && \
'torchaudio' \
'torchvision' && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

Expand Down
4 changes: 2 additions & 2 deletions images/pytorch-notebook/cuda12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3013
RUN pip install --no-cache-dir --extra-index-url=https://pypi.nvidia.com --index-url 'https://download.pytorch.org/whl/cu121' \
'torch' \
'torchvision' \
'torchaudio' && \
'torchaudio' \
'torchvision' && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

Expand Down
4 changes: 2 additions & 2 deletions images/scipy-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN mamba install --yes \
'dask' \
'dill' \
'h5py' \
'ipympl'\
'ipympl' \
'ipywidgets' \
'jupyterlab-git' \
'matplotlib-base' \
Expand All @@ -56,7 +56,7 @@ RUN mamba install --yes \
'sqlalchemy' \
'statsmodels' \
'sympy' \
'widgetsnbextension'\
'widgetsnbextension' \
'xlrd' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
Expand Down
4 changes: 2 additions & 2 deletions images/tensorflow-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install tensorflow with pip, on x86_64 tensorflow-cpu
RUN [[ $(uname -m) = x86_64 ]] && TF_POSTFIX="-cpu" || TF_POSTFIX="" && \
pip install --no-cache-dir \
"tensorflow${TF_POSTFIX}" \
"jupyter-server-proxy" && \
"jupyter-server-proxy" \
"tensorflow${TF_POSTFIX}" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

Expand Down
4 changes: 2 additions & 2 deletions images/tensorflow-notebook/cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install TensorFlow, CUDA and cuDNN with pip
RUN pip install --no-cache-dir \
"tensorflow[and-cuda]" \
"jupyter-server-proxy" && \
"jupyter-server-proxy" \
"tensorflow[and-cuda]" && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

Expand Down

0 comments on commit 5ea1adb

Please sign in to comment.