From f787eab750189aa968a1bf7f5a0473157b2213d7 Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Fri, 31 Jan 2025 12:31:48 +0000 Subject: [PATCH 1/7] Change base image as the previous won't build correctly --- single-user-r-d4science/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/single-user-r-d4science/Dockerfile b/single-user-r-d4science/Dockerfile index d23a654..a4b95a2 100644 --- a/single-user-r-d4science/Dockerfile +++ b/single-user-r-d4science/Dockerfile @@ -1,4 +1,6 @@ -FROM jupyter/datascience-notebook:7e1a19a8427f +# quay.io/jupyter/datascience-notebook@sha256:14379f24c840f27375e3a4b29a9fa55e449633ac85c9cf3806ca62d11e5603ec +# is python3.11 +FROM quay.io/jupyter/datascience-notebook@sha256:14379f24c840f27375e3a4b29a9fa55e449633ac85c9cf3806ca62d11e5603ec USER root From ab39d5dd8cc64f4fb8ed8744f2a44fc688319943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Wed, 28 Jan 2026 09:53:05 +0100 Subject: [PATCH 2/7] Try to reduce the size of images --- d4science-base/Dockerfile | 10 ++++++++-- single-user-d4science/Dockerfile | 27 +++++++++------------------ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/d4science-base/Dockerfile b/d4science-base/Dockerfile index 9b11f0a..a829091 100644 --- a/d4science-base/Dockerfile +++ b/d4science-base/Dockerfile @@ -60,6 +60,14 @@ USER $NB_UID RUN julia -e 'import Pkg; Pkg.update()' && \ julia -e 'import Pkg; Pkg.add("HDF5")' && \ julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \ + julia --eval 'using Pkg; Pkg.pin("IJulia")' && \ + julia --eval "using Pkg; Pkg.update()" && \ + julia --eval 'using Pkg; Pkg.add(["Images","VideoIO"])' && \ + julia --eval 'using Pkg; Pkg.add(url="https://github.com/gher-ulg/DIVAndNN.jl")' && \ + julia --eval 'using Pkg; Pkg.add(name="DIVAnd", version="2.7.9")' && \ + julia --eval 'using Pkg; Pkg.add(["JSON", "PyCall", "PyPlot", "Glob", "DataStructures", "NCDatasets"])' && \ + julia --eval 'using Pkg; Pkg.add(url="https://github.com/Alexander-Barth/CoastalCurrents.jl")' && \ + julia --eval 'using Pkg; Pkg.add("PhysOcean")' \ # move kernelspec out of home \ mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/" && \ chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \ @@ -89,8 +97,6 @@ RUN mamba install --channel conda-forge -y -q \ netcdf4 \ aiohttp \ graph-tool \ - scikit-learn \ - scikit-mobility \ dask-jobqueue \ fs \ rasterio \ diff --git a/single-user-d4science/Dockerfile b/single-user-d4science/Dockerfile index 28972b6..81e2aeb 100644 --- a/single-user-d4science/Dockerfile +++ b/single-user-d4science/Dockerfile @@ -16,16 +16,16 @@ RUN apt-get -qq update \ USER $NB_UID -RUN conda create --quiet --yes -n java8 \ - && mamba install -n java8 --yes openjdk=8 \ - && conda clean -tipy +#RUN conda create --quiet --yes -n java8 \ +# && mamba install -n java8 --yes openjdk=8 \ +# && conda clean -tipy ENV CPLUS_INCLUDE_PATH=/usr/include/gdal ENV C_INCLUDE_PATH=/usr/include/gdal # Installing torch explictly to have only CPU version -RUN pip install --index-url https://download.pytorch.org/whl/cpu \ - torch torchvision torchaudio +#RUN pip install --index-url https://download.pytorch.org/whl/cpu \ +# torch torchvision torchaudio # cdlib[C]==0.2.3 is too old for this env, so unpinning @@ -60,22 +60,13 @@ RUN pip install --no-cache-dir \ GDAL==$(gdal-config --version) \ copernicusmarine -# Julia Updates and packages installations -# See https://support.d4science.org/issues/22065 -RUN julia --eval 'using Pkg; Pkg.pin("IJulia")' \ - && julia --eval "using Pkg; Pkg.update()" \ - && julia --eval 'using Pkg; Pkg.add(["Images","VideoIO"])' \ - && julia --eval 'using Pkg; Pkg.add(url="https://github.com/gher-ulg/DIVAndNN.jl")' \ - && julia --eval 'using Pkg; Pkg.add(name="DIVAnd", version="2.7.9")' \ - && julia --eval 'using Pkg; Pkg.add(["JSON", "PyCall", "PyPlot", "Glob", "DataStructures", "NCDatasets"])' \ - && julia --eval 'using Pkg; Pkg.add(url="https://github.com/Alexander-Barth/CoastalCurrents.jl")' \ - && julia --eval 'using Pkg; Pkg.add("PhysOcean")' # ------------------------------- # JupyterLab extensions # ------------------------------- RUN pip install --no-cache-dir \ jupyterlab-topbar \ - jupyterlab-system-monitor -RUN jupyter labextension disable @jupyterlab/filebrowser-extension:share-file -RUN jupyter lab build + jupyterlab-system-monitor \ + && jupyter labextension disable @jupyterlab/filebrowser-extension:share-file \ + && jupyter lab build \ + && jupyter lab clean From e9831bf42bb51b81cf03edc21468b027de5b2bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Wed, 28 Jan 2026 11:26:35 +0100 Subject: [PATCH 3/7] Remove duplicated update --- d4science-base/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/d4science-base/Dockerfile b/d4science-base/Dockerfile index a829091..fc37dd1 100644 --- a/d4science-base/Dockerfile +++ b/d4science-base/Dockerfile @@ -61,7 +61,6 @@ RUN julia -e 'import Pkg; Pkg.update()' && \ julia -e 'import Pkg; Pkg.add("HDF5")' && \ julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \ julia --eval 'using Pkg; Pkg.pin("IJulia")' && \ - julia --eval "using Pkg; Pkg.update()" && \ julia --eval 'using Pkg; Pkg.add(["Images","VideoIO"])' && \ julia --eval 'using Pkg; Pkg.add(url="https://github.com/gher-ulg/DIVAndNN.jl")' && \ julia --eval 'using Pkg; Pkg.add(name="DIVAnd", version="2.7.9")' && \ From 9dfafc4d14f17b316254e902f689058bfbfd8235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Wed, 28 Jan 2026 12:03:21 +0100 Subject: [PATCH 4/7] Another attempt --- d4science-base/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/d4science-base/Dockerfile b/d4science-base/Dockerfile index fc37dd1..8883c40 100644 --- a/d4science-base/Dockerfile +++ b/d4science-base/Dockerfile @@ -58,6 +58,11 @@ USER $NB_UID # to the system share location. Avoids problems with runtime UID change not # taking effect properly on the .local folder in the jovyan home dir. RUN julia -e 'import Pkg; Pkg.update()' && \ + # move kernelspec out of home \ + mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/" && \ + chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \ + rm -rf "${HOME}/.local" && \ + fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter" && \ julia -e 'import Pkg; Pkg.add("HDF5")' && \ julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \ julia --eval 'using Pkg; Pkg.pin("IJulia")' && \ @@ -67,11 +72,6 @@ RUN julia -e 'import Pkg; Pkg.update()' && \ julia --eval 'using Pkg; Pkg.add(["JSON", "PyCall", "PyPlot", "Glob", "DataStructures", "NCDatasets"])' && \ julia --eval 'using Pkg; Pkg.add(url="https://github.com/Alexander-Barth/CoastalCurrents.jl")' && \ julia --eval 'using Pkg; Pkg.add("PhysOcean")' \ - # move kernelspec out of home \ - mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/" && \ - chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \ - rm -rf "${HOME}/.local" && \ - fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter" # end Julia Setup # ----------------------------------------------------------------------------- From ee7fcdb19c90baed181c627fba1ee68e448f3ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Wed, 28 Jan 2026 12:15:31 +0100 Subject: [PATCH 5/7] Fix building --- d4science-base/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/d4science-base/Dockerfile b/d4science-base/Dockerfile index 8883c40..41427e1 100644 --- a/d4science-base/Dockerfile +++ b/d4science-base/Dockerfile @@ -58,20 +58,20 @@ USER $NB_UID # to the system share location. Avoids problems with runtime UID change not # taking effect properly on the .local folder in the jovyan home dir. RUN julia -e 'import Pkg; Pkg.update()' && \ + julia -e 'import Pkg; Pkg.add("HDF5")' && \ + julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \ + julia --eval 'using Pkg; Pkg.pin("IJulia")' && \ # move kernelspec out of home \ mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/" && \ chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \ rm -rf "${HOME}/.local" && \ fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter" && \ - julia -e 'import Pkg; Pkg.add("HDF5")' && \ - julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \ - julia --eval 'using Pkg; Pkg.pin("IJulia")' && \ julia --eval 'using Pkg; Pkg.add(["Images","VideoIO"])' && \ julia --eval 'using Pkg; Pkg.add(url="https://github.com/gher-ulg/DIVAndNN.jl")' && \ julia --eval 'using Pkg; Pkg.add(name="DIVAnd", version="2.7.9")' && \ julia --eval 'using Pkg; Pkg.add(["JSON", "PyCall", "PyPlot", "Glob", "DataStructures", "NCDatasets"])' && \ julia --eval 'using Pkg; Pkg.add(url="https://github.com/Alexander-Barth/CoastalCurrents.jl")' && \ - julia --eval 'using Pkg; Pkg.add("PhysOcean")' \ + julia --eval 'using Pkg; Pkg.add("PhysOcean")' # end Julia Setup # ----------------------------------------------------------------------------- From 5aebdc4f9135bc6e10b1dcae8777dc9882b2ad9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Fri, 30 Jan 2026 08:24:27 +0000 Subject: [PATCH 6/7] Fix julia packages --- d4science-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d4science-base/Dockerfile b/d4science-base/Dockerfile index 41427e1..bdec4b9 100644 --- a/d4science-base/Dockerfile +++ b/d4science-base/Dockerfile @@ -67,8 +67,8 @@ RUN julia -e 'import Pkg; Pkg.update()' && \ rm -rf "${HOME}/.local" && \ fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter" && \ julia --eval 'using Pkg; Pkg.add(["Images","VideoIO"])' && \ - julia --eval 'using Pkg; Pkg.add(url="https://github.com/gher-ulg/DIVAndNN.jl")' && \ - julia --eval 'using Pkg; Pkg.add(name="DIVAnd", version="2.7.9")' && \ + julia --eval 'using Pkg; Pkg.add(url="https://github.com/gher-uliege/OceanPlot.jl",rev="master")' + julia --eval 'using Pkg; Pkg.add(name="DIVAnd", version="2.7.14")' && \ julia --eval 'using Pkg; Pkg.add(["JSON", "PyCall", "PyPlot", "Glob", "DataStructures", "NCDatasets"])' && \ julia --eval 'using Pkg; Pkg.add(url="https://github.com/Alexander-Barth/CoastalCurrents.jl")' && \ julia --eval 'using Pkg; Pkg.add("PhysOcean")' From b0eaf601f4b5f8fdc58e6fa38da85031a2661043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Fri, 30 Jan 2026 10:49:43 +0000 Subject: [PATCH 7/7] Upgrade base image --- d4science-base/Dockerfile | 57 ++++----------------------------------- 1 file changed, 5 insertions(+), 52 deletions(-) diff --git a/d4science-base/Dockerfile b/d4science-base/Dockerfile index bdec4b9..d52a6df 100644 --- a/d4science-base/Dockerfile +++ b/d4science-base/Dockerfile @@ -1,7 +1,9 @@ -# 4d70cf8da953 has python3.10.11 +# Using julia-1.12.4 / python3.13 # Using that to ensure the image remains the same -FROM jupyter/datascience-notebook:4d70cf8da953 -ARG julia_version="1.9.3" +FROM quay.io/jupyter/datascience-notebook@sha256:7e4d915319d998c5dbca911ae8ea3d7c59193aad598c75f8bf272a57d5ddfca2 + +#FROM jupyter/datascience-notebook:4d70cf8da953 +#ARG julia_version="1.9.3" USER root @@ -17,55 +19,10 @@ RUN apt-get -qq update \ RUN curl https://raw.githubusercontent.com/kadwanev/retry/master/retry \ -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry -# ----------------------------------------------------------------------------- -# Julia setup - we need a newer version than the one in the base -# Julia dependencies -# install Julia packages in /opt/julia instead of ${HOME} -ENV JULIA_DEPOT_PATH=/opt/julia \ - JULIA_PKGDIR=/opt/julia \ - JULIA_VERSION="${julia_version}" - -WORKDIR /tmp - -# hadolint ignore=SC2046 -RUN set -x && \ - julia_arch=$(uname -m) && \ - julia_short_arch="${julia_arch}" && \ - if [ "${julia_short_arch}" == "x86_64" ]; then \ - julia_short_arch="x64"; \ - fi; \ - julia_installer="julia-${JULIA_VERSION}-linux-${julia_arch}.tar.gz" && \ - julia_major_minor=$(echo "${JULIA_VERSION}" | cut -d. -f 1,2) && \ - mkdir "/opt/julia-${JULIA_VERSION}" && \ - wget -q "https://julialang-s3.julialang.org/bin/linux/${julia_short_arch}/${julia_major_minor}/${julia_installer}" && \ - tar xzf "${julia_installer}" -C "/opt/julia-${JULIA_VERSION}" --strip-components=1 && \ - rm "${julia_installer}" && \ - ln -fs /opt/julia-${JULIA_VERSION}/bin/julia /usr/local/bin/julia - -# Show Julia where conda libraries are \ -RUN rm -rf /etc/julia && mkdir /etc/julia && \ - echo "push!(Libdl.DL_LOAD_PATH, \"${CONDA_DIR}/lib\")" >> /etc/julia/juliarc.jl && \ - # Create JULIA_PKGDIR \ - rm -rf "${JULIA_PKGDIR}" && \ - mkdir "${JULIA_PKGDIR}" && \ - chown "${NB_USER}" "${JULIA_PKGDIR}" && \ - fix-permissions "${JULIA_PKGDIR}" - USER $NB_UID # Add Julia packages. -# Install IJulia as jovyan and then move the kernelspec out -# to the system share location. Avoids problems with runtime UID change not -# taking effect properly on the .local folder in the jovyan home dir. RUN julia -e 'import Pkg; Pkg.update()' && \ - julia -e 'import Pkg; Pkg.add("HDF5")' && \ - julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \ - julia --eval 'using Pkg; Pkg.pin("IJulia")' && \ - # move kernelspec out of home \ - mv "${HOME}/.local/share/jupyter/kernels/julia"* "${CONDA_DIR}/share/jupyter/kernels/" && \ - chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \ - rm -rf "${HOME}/.local" && \ - fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter" && \ julia --eval 'using Pkg; Pkg.add(["Images","VideoIO"])' && \ julia --eval 'using Pkg; Pkg.add(url="https://github.com/gher-uliege/OceanPlot.jl",rev="master")' julia --eval 'using Pkg; Pkg.add(name="DIVAnd", version="2.7.14")' && \ @@ -73,10 +30,6 @@ RUN julia -e 'import Pkg; Pkg.update()' && \ julia --eval 'using Pkg; Pkg.add(url="https://github.com/Alexander-Barth/CoastalCurrents.jl")' && \ julia --eval 'using Pkg; Pkg.add("PhysOcean")' -# end Julia Setup -# ----------------------------------------------------------------------------- - - RUN mamba install --channel conda-forge -y -q \ rdflib \ prov \