mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-15 14:02:58 +00:00
Improve Dockerfiles codestyle
This commit is contained in:
@@ -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 && \
|
||||
|
@@ -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
|
||||
|
@@ -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}"
|
||||
|
@@ -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}"
|
||||
|
||||
|
@@ -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}"
|
||||
|
||||
|
@@ -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}" && \
|
||||
|
@@ -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}"
|
||||
|
||||
|
@@ -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}"
|
||||
|
||||
|
Reference in New Issue
Block a user