From 25d4876efe6669de907be2630983e93aebc2a3af Mon Sep 17 00:00:00 2001 From: romainx Date: Tue, 4 May 2021 18:36:03 +0200 Subject: [PATCH 1/6] Regular update --- Makefile | 2 +- base-notebook/Dockerfile | 4 ++-- pyspark-notebook/Dockerfile | 2 +- scipy-notebook/Dockerfile | 4 ++-- tensorflow-notebook/Dockerfile | 3 +-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 00eabfee..7f846554 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ ALL_IMAGES:=$(ALL_STACKS) # Dockerfile Linter HADOLINT="${HOME}/hadolint" -HADOLINT_VERSION="v2.1.0" +HADOLINT_VERSION="v2.3.0" # Enable BuildKit for Docker build export DOCKER_BUILDKIT:=1 diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index bff89e95..5266153e 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -24,7 +24,7 @@ USER root # (ARGS are in lower case to distinguish them from ENV) # Check https://github.com/conda-forge/miniforge/releases # Conda version -ARG conda_version="4.10.0" +ARG conda_version="4.10.1" # Miniforge installer patch version ARG miniforge_patch_number="0" # Miniforge installer architecture @@ -39,7 +39,7 @@ ARG miniforge_version="${conda_version}-${miniforge_patch_number}" # Miniforge installer ARG miniforge_installer="${miniforge_python}-${miniforge_version}-Linux-${miniforge_arch}.sh" # Miniforge checksum -ARG miniforge_checksum="c56cc2da96043688c6bdb521d825de27754de0a342d5228ba3155cd94532ff75" +ARG miniforge_checksum="2eb2226214aeec849d9fc935ac092e669993a666a6b25c613b1efc9590441777" # Install all OS dependencies for notebook server that starts but lacks all # features (e.g., download as all possible file formats) diff --git a/pyspark-notebook/Dockerfile b/pyspark-notebook/Dockerfile index 9f09e161..6c24329d 100644 --- a/pyspark-notebook/Dockerfile +++ b/pyspark-notebook/Dockerfile @@ -56,7 +56,7 @@ USER $NB_UID # Install pyarrow RUN conda install --quiet --yes --satisfied-skip-solve \ - 'pyarrow=3.0.*' && \ + 'pyarrow=4.0.*' && \ conda clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" diff --git a/scipy-notebook/Dockerfile b/scipy-notebook/Dockerfile index dd912670..bedbaa02 100644 --- a/scipy-notebook/Dockerfile +++ b/scipy-notebook/Dockerfile @@ -24,7 +24,7 @@ RUN conda install --quiet --yes \ 'cython=0.29.*' \ 'dask=2021.4.*' \ 'dill=0.3.*' \ - 'h5py=3.1.*' \ + 'h5py=3.2.*' \ 'ipywidgets=7.6.*' \ 'ipympl=0.7.*'\ 'matplotlib-base=3.4.*' \ @@ -40,7 +40,7 @@ RUN conda install --quiet --yes \ 'seaborn=0.11.*' \ 'sqlalchemy=1.4.*' \ 'statsmodels=0.12.*' \ - 'sympy=1.7.*' \ + 'sympy=1.8.*' \ 'vincent=0.4.*' \ 'widgetsnbextension=3.5.*'\ 'xlrd=2.0.*' && \ diff --git a/tensorflow-notebook/Dockerfile b/tensorflow-notebook/Dockerfile index 902218f0..7be3aed8 100644 --- a/tensorflow-notebook/Dockerfile +++ b/tensorflow-notebook/Dockerfile @@ -7,8 +7,7 @@ LABEL maintainer="Jupyter Project " # Install Tensorflow RUN mamba install --quiet --yes \ - 'tensorflow=2.4.1' \ - && \ + 'tensorflow=2.4.1' && \ conda clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" From 3f1fc82e03deb1c3b117c65a96f198401b930e2c Mon Sep 17 00:00:00 2001 From: romainx Date: Tue, 4 May 2021 21:58:36 +0200 Subject: [PATCH 2/6] Fix DL3059 info: Multiple consecutive `RUN` ... Also fixed Mambaforge checksum --- base-notebook/Dockerfile | 14 ++++++-------- datascience-notebook/Dockerfile | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index 5266153e..1192d215 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -39,7 +39,7 @@ ARG miniforge_version="${conda_version}-${miniforge_patch_number}" # Miniforge installer ARG miniforge_installer="${miniforge_python}-${miniforge_version}-Linux-${miniforge_arch}.sh" # Miniforge checksum -ARG miniforge_checksum="2eb2226214aeec849d9fc935ac092e669993a666a6b25c613b1efc9590441777" +ARG miniforge_checksum="d4065b376f81b83cfef0c7316f97bb83337e4ae27eb988828363a578226e3a62" # Install all OS dependencies for notebook server that starts but lacks all # features (e.g., download as all possible file formats) @@ -51,10 +51,9 @@ RUN apt-get -q update \ sudo \ locales \ fonts-liberation \ - run-one \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ + run-one && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ + echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ locale-gen # Configure environment @@ -159,9 +158,8 @@ USER root # Prepare upgrade to JupyterLab V3.0 #1205 RUN sed -re "s/c.NotebookApp/c.ServerApp/g" \ - /etc/jupyter/jupyter_notebook_config.py > /etc/jupyter/jupyter_server_config.py - -RUN fix-permissions /etc/jupyter/ + /etc/jupyter/jupyter_notebook_config.py > /etc/jupyter/jupyter_server_config.py && \ + fix-permissions /etc/jupyter/ # Switch back to jovyan to avoid accidental container runs as root USER $NB_UID diff --git a/datascience-notebook/Dockerfile b/datascience-notebook/Dockerfile index de58ea49..62ce058c 100644 --- a/datascience-notebook/Dockerfile +++ b/datascience-notebook/Dockerfile @@ -39,8 +39,8 @@ RUN mkdir "/opt/julia-${JULIA_VERSION}" && \ wget -q https://julialang-s3.julialang.org/bin/linux/x64/$(echo "${JULIA_VERSION}" | cut -d. -f 1,2)"/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" && \ echo "${julia_checksum} *julia-${JULIA_VERSION}-linux-x86_64.tar.gz" | sha256sum -c - && \ tar xzf "julia-${JULIA_VERSION}-linux-x86_64.tar.gz" -C "/opt/julia-${JULIA_VERSION}" --strip-components=1 && \ - rm "/tmp/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" -RUN ln -fs /opt/julia-*/bin/julia /usr/local/bin/julia + rm "/tmp/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" && \ + ln -fs /opt/julia-*/bin/julia /usr/local/bin/julia # Show Julia where conda libraries are \ RUN mkdir /etc/julia && \ From 10ee903c353d35d1e3c223fe4919342af0f9a2a9 Mon Sep 17 00:00:00 2001 From: romainx Date: Wed, 5 May 2021 12:53:13 +0200 Subject: [PATCH 3/6] Fix style --- base-notebook/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index 1192d215..329a3f99 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -44,8 +44,8 @@ ARG miniforge_checksum="d4065b376f81b83cfef0c7316f97bb83337e4ae27eb988828363a578 # Install all OS dependencies for notebook server that starts but lacks all # features (e.g., download as all possible file formats) ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -q update \ - && apt-get install -yq --no-install-recommends \ +RUN apt-get -q update && \ + apt-get install -yq --no-install-recommends \ wget \ ca-certificates \ sudo \ From b9a0f92e9a7d954f7fd186aaceb4c1dfd90f81b6 Mon Sep 17 00:00:00 2001 From: romainx Date: Wed, 5 May 2021 21:17:52 +0200 Subject: [PATCH 4/6] Rollback Python version --- base-notebook/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index 329a3f99..a3422dd3 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -24,7 +24,7 @@ USER root # (ARGS are in lower case to distinguish them from ENV) # Check https://github.com/conda-forge/miniforge/releases # Conda version -ARG conda_version="4.10.1" +ARG conda_version="4.10.0" # Miniforge installer patch version ARG miniforge_patch_number="0" # Miniforge installer architecture @@ -39,7 +39,7 @@ ARG miniforge_version="${conda_version}-${miniforge_patch_number}" # Miniforge installer ARG miniforge_installer="${miniforge_python}-${miniforge_version}-Linux-${miniforge_arch}.sh" # Miniforge checksum -ARG miniforge_checksum="d4065b376f81b83cfef0c7316f97bb83337e4ae27eb988828363a578226e3a62" +ARG miniforge_checksum="c56cc2da96043688c6bdb521d825de27754de0a342d5228ba3155cd94532ff75" # Install all OS dependencies for notebook server that starts but lacks all # features (e.g., download as all possible file formats) From 4b243e84012ae2b9391aad14ccda4a502942c313 Mon Sep 17 00:00:00 2001 From: romainx Date: Wed, 5 May 2021 21:19:13 +0200 Subject: [PATCH 5/6] Test Python version --- base-notebook/test/test_python.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 base-notebook/test/test_python.py diff --git a/base-notebook/test/test_python.py b/base-notebook/test/test_python.py new file mode 100644 index 00000000..6cbde99f --- /dev/null +++ b/base-notebook/test/test_python.py @@ -0,0 +1,19 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. +import logging + +from packaging import version + +LOGGER = logging.getLogger(__name__) + + +def test_python_version(container, python_max_version="3.9"): + """Check that python version is not higher than a max version""" + LOGGER.info(f"Checking that python version is lower than {python_max_version}") + c = container.run(tty=True, command=["start.sh"]) + cmd = c.exec_run("python --version") + output = cmd.output.decode("utf-8") + actual_python_version = version.parse(output.split()[1]) + assert actual_python_version < version.parse( + python_max_version + ), f"Python version shall be lower than {python_max_version}" From 672c4cce403cee35af42ca5e605c214d7afc302a Mon Sep 17 00:00:00 2001 From: romainx Date: Thu, 6 May 2021 07:01:57 +0200 Subject: [PATCH 6/6] Wording --- base-notebook/test/test_python.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/base-notebook/test/test_python.py b/base-notebook/test/test_python.py index 6cbde99f..f36b748e 100644 --- a/base-notebook/test/test_python.py +++ b/base-notebook/test/test_python.py @@ -7,13 +7,13 @@ from packaging import version LOGGER = logging.getLogger(__name__) -def test_python_version(container, python_max_version="3.9"): - """Check that python version is not higher than a max version""" - LOGGER.info(f"Checking that python version is lower than {python_max_version}") +def test_python_version(container, python_next_version="3.9"): + """Check that python version is lower than the next version""" + LOGGER.info(f"Checking that python version is lower than {python_next_version}") c = container.run(tty=True, command=["start.sh"]) cmd = c.exec_run("python --version") output = cmd.output.decode("utf-8") actual_python_version = version.parse(output.split()[1]) assert actual_python_version < version.parse( - python_max_version - ), f"Python version shall be lower than {python_max_version}" + python_next_version + ), f"Python version shall be lower than {python_next_version}"