diff --git a/d4science-base/Dockerfile b/d4science-base/Dockerfile index 9b11f0a..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,58 +19,16 @@ 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"' && \ - # 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 -# ----------------------------------------------------------------------------- - + 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")' && \ + 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")' RUN mamba install --channel conda-forge -y -q \ rdflib \ @@ -89,8 +49,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 946abd0..55b8df5 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,31 +60,12 @@ 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")' \ - && julia --eval 'using Pkg; \ - Pkg.add(["CSV", "DataFrames", "Revise", "Compat", "Dates", \ - "Statistics", "Logging", "Random", "Printf", "FileIO", \ - "Missings", "Distributed", "Profile", "StatsBase", \ - "JLD2", "Interpolations"]);' \ - && cd /tmp \ - && git clone https://github.com/Alexander-Barth/CoastalCurrents.jl \ - && cd CoastalCurrents.jl \ - && julia --project=. --eval "using Pkg; Pkg.instantiate()" - # ------------------------------- # 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