diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index bff89e95..a3422dd3 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -44,17 +44,16 @@ ARG miniforge_checksum="c56cc2da96043688c6bdb521d825de27754de0a342d5228ba3155cd9 # 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 \ 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/base-notebook/test/test_python.py b/base-notebook/test/test_python.py new file mode 100644 index 00000000..f36b748e --- /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_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_next_version + ), f"Python version shall be lower than {python_next_version}" 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 && \ 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}"