From 5ea1adbfd8fd96dbebc9cfb550edeaae71f59bc4 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Mon, 19 Aug 2024 15:40:40 +0100 Subject: [PATCH] Improve Dockerfiles codestyle --- images/base-notebook/Dockerfile | 8 ++++---- images/docker-stacks-foundation/Dockerfile | 4 ++-- images/pytorch-notebook/Dockerfile | 4 ++-- images/pytorch-notebook/cuda11/Dockerfile | 4 ++-- images/pytorch-notebook/cuda12/Dockerfile | 4 ++-- images/scipy-notebook/Dockerfile | 4 ++-- images/tensorflow-notebook/Dockerfile | 4 ++-- images/tensorflow-notebook/cuda/Dockerfile | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/images/base-notebook/Dockerfile b/images/base-notebook/Dockerfile index 07903b9437..672f66b0cf 100644 --- a/images/base-notebook/Dockerfile +++ b/images/base-notebook/Dockerfile @@ -31,7 +31,7 @@ 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 @@ -39,10 +39,10 @@ USER ${NB_UID} # 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 && \ diff --git a/images/docker-stacks-foundation/Dockerfile b/images/docker-stacks-foundation/Dockerfile index 7852fe9d26..fafc3cd317 100644 --- a/images/docker-stacks-foundation/Dockerfile +++ b/images/docker-stacks-foundation/Dockerfile @@ -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 diff --git a/images/pytorch-notebook/Dockerfile b/images/pytorch-notebook/Dockerfile index 922e638979..13d1a1811b 100644 --- a/images/pytorch-notebook/Dockerfile +++ b/images/pytorch-notebook/Dockerfile @@ -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}" diff --git a/images/pytorch-notebook/cuda11/Dockerfile b/images/pytorch-notebook/cuda11/Dockerfile index d19d0f1234..d1a5b99086 100644 --- a/images/pytorch-notebook/cuda11/Dockerfile +++ b/images/pytorch-notebook/cuda11/Dockerfile @@ -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}" diff --git a/images/pytorch-notebook/cuda12/Dockerfile b/images/pytorch-notebook/cuda12/Dockerfile index 36b60d38c1..59081e3870 100644 --- a/images/pytorch-notebook/cuda12/Dockerfile +++ b/images/pytorch-notebook/cuda12/Dockerfile @@ -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}" diff --git a/images/scipy-notebook/Dockerfile b/images/scipy-notebook/Dockerfile index 1c8003d490..ad2d838f59 100644 --- a/images/scipy-notebook/Dockerfile +++ b/images/scipy-notebook/Dockerfile @@ -38,7 +38,7 @@ RUN mamba install --yes \ 'dask' \ 'dill' \ 'h5py' \ - 'ipympl'\ + 'ipympl' \ 'ipywidgets' \ 'jupyterlab-git' \ 'matplotlib-base' \ @@ -56,7 +56,7 @@ RUN mamba install --yes \ 'sqlalchemy' \ 'statsmodels' \ 'sympy' \ - 'widgetsnbextension'\ + 'widgetsnbextension' \ 'xlrd' && \ mamba clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ diff --git a/images/tensorflow-notebook/Dockerfile b/images/tensorflow-notebook/Dockerfile index 01ace0f1a1..d6c0b78a93 100644 --- a/images/tensorflow-notebook/Dockerfile +++ b/images/tensorflow-notebook/Dockerfile @@ -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}" diff --git a/images/tensorflow-notebook/cuda/Dockerfile b/images/tensorflow-notebook/cuda/Dockerfile index f27ba2bd2f..f71f641606 100644 --- a/images/tensorflow-notebook/cuda/Dockerfile +++ b/images/tensorflow-notebook/cuda/Dockerfile @@ -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}"