From 0529b60466c62357e85ab8dbcc417b9e54220ddb Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 14:40:24 +0530 Subject: [PATCH 01/16] Install python into a venv - Continues to use python and venv from Ubuntu LTS repositories, so they are supported as with everything else that is gotten from apt (see https://github.com/rocker-org/rocker-versioned2/issues/670#issuecomment-1619748511) - Doesn't currently change any permissions, so present behavior is preserved. However, in the future, we should probably change ownership so end users can install packages in there at runtime (see https://github.com/rocker-org/rocker-versioned2/issues/670#issuecomment-1624691981) - Sets the VIRTUAL_ENV environment variable to path of the venv we create. This is what the `source activate` script does, and Reticulate also looks for this to discover which python to use (see point 4 of https://rstudio.github.io/reticulate/articles/versions.html#order-of-discovery) - Sets up PATH appropriately, so python and python3 refer to what is in our venv. This, along with the previous step, ensures same behavior as users typing `source ${VIRTUAL_ENV}/bin/activate` without actually having to do that, preserving end user behavioral semantics. - Remove the explicit symlink of python3 -> python, as venv handles this automatically. Decisions to be made: - Where do we set the appropriate env variables (VIRTUAL_ENV and PATH)? They need to be set for `install_python.sh` to work correctly. I've set them in the binder image for now, but it should probably be set on a more base image. This is a no-op if `install-python.sh` is not called anywhere. Ref https://github.com/rocker-org/rocker-versioned2/issues/670 --- dockerfiles/binder_devel.Dockerfile | 2 ++ scripts/install_python.sh | 10 +++++----- stacks/devel.json | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dockerfiles/binder_devel.Dockerfile b/dockerfiles/binder_devel.Dockerfile index fe4710f9..524b5199 100644 --- a/dockerfiles/binder_devel.Dockerfile +++ b/dockerfiles/binder_devel.Dockerfile @@ -6,6 +6,8 @@ LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \ org.opencontainers.image.authors="Carl Boettiger " ENV NB_USER=rstudio +ENV VIRTUAL_ENV=/opt/venv +ENV PATH=${PATH}:${VIRTUAL_ENV}/bin RUN /rocker_scripts/install_jupyter.sh diff --git a/scripts/install_python.sh b/scripts/install_python.sh index 1a07c23a..4903e996 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -22,14 +22,14 @@ apt_install \ python3-venv \ swig +# Setup a virtualenv to install things into +python3 -m venv ${VIRTUAL_ENV} +export PATH=${VIRTUAL_ENV}:${PATH} + +# Upgrade version of pip inside the virtualenv python3 -m pip --no-cache-dir install --upgrade \ pip -# Some TF tools expect a "python" binary -if [ ! -e /usr/local/bin/python ]; then - ln -s "$(which python3)" /usr/local/bin/python -fi - install2.r --error --skipmissing --skipinstalled -n "$NCPUS" reticulate # Clean up diff --git a/stacks/devel.json b/stacks/devel.json index 2aca598c..6b0b5f36 100644 --- a/stacks/devel.json +++ b/stacks/devel.json @@ -127,7 +127,9 @@ }, "FROM": "rocker/geospatial:devel", "ENV": { - "NB_USER": "rstudio" + "NB_USER": "rstudio", + "VIRTUAL_ENV": "/opt/venv", + "PATH": "${PATH}:${VIRTUAL_ENV}/bin" }, "RUN": [ "/rocker_scripts/install_jupyter.sh" From 83a48b1820a1f4c31b2e725024d8d1eb8e99cb90 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 15:10:46 +0530 Subject: [PATCH 02/16] Use default value for VIRTUAL_ENV if not provided --- scripts/install_python.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index 4903e996..cb2f246e 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -23,9 +23,13 @@ apt_install \ swig # Setup a virtualenv to install things into -python3 -m venv ${VIRTUAL_ENV} + +# Put things under /opt/venv, if nothing else is specified +export VIRTUAL_ENV="${VIRTUAL_ENV:=/opt/venv}" export PATH=${VIRTUAL_ENV}:${PATH} +python3 -m venv ${VIRTUAL_ENV} + # Upgrade version of pip inside the virtualenv python3 -m pip --no-cache-dir install --upgrade \ pip From dcd8b03bbe6581bf705ec0b2facced2ee3ca1586 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 15:20:06 +0530 Subject: [PATCH 03/16] source install_python in install_jupyter.sh So it sets PATH appropriately --- scripts/install_jupyter.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_jupyter.sh b/scripts/install_jupyter.sh index 12260fff..1e9a01cf 100755 --- a/scripts/install_jupyter.sh +++ b/scripts/install_jupyter.sh @@ -27,7 +27,7 @@ if ! id -u "${NB_USER}" >/dev/null 2>&1; then fi # install python -/rocker_scripts/install_python.sh +source /rocker_scripts/install_python.sh python3 -m pip install --no-cache-dir jupyter-rsession-proxy notebook jupyterlab jupyterhub From 7497edc50a96a139372d7733dfe43698d39e7f3a Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 15:26:35 +0530 Subject: [PATCH 04/16] Satisfy shellcheck --- scripts/install_python.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index cb2f246e..6f27f578 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -26,9 +26,9 @@ apt_install \ # Put things under /opt/venv, if nothing else is specified export VIRTUAL_ENV="${VIRTUAL_ENV:=/opt/venv}" -export PATH=${VIRTUAL_ENV}:${PATH} +export PATH="${VIRTUAL_ENV}:${PATH}" -python3 -m venv ${VIRTUAL_ENV} +python3 -m venv "${VIRTUAL_ENV}" # Upgrade version of pip inside the virtualenv python3 -m pip --no-cache-dir install --upgrade \ From 63c823e19372062a4d6d532475146f2dc552b343 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 15:31:12 +0530 Subject: [PATCH 05/16] Don't try to lint install_python.sh --- scripts/install_jupyter.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install_jupyter.sh b/scripts/install_jupyter.sh index 1e9a01cf..00db0ab2 100755 --- a/scripts/install_jupyter.sh +++ b/scripts/install_jupyter.sh @@ -26,7 +26,8 @@ if ! id -u "${NB_USER}" >/dev/null 2>&1; then /rocker_scripts/default_user.sh "${NB_USER}" fi -# install python +# install python & setup venv +# shellcheck source=/dev/null source /rocker_scripts/install_python.sh python3 -m pip install --no-cache-dir jupyter-rsession-proxy notebook jupyterlab jupyterhub From dbb8453b786ed7b0a35236fc9bc3a7bfa56bb47b Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 15:47:40 +0530 Subject: [PATCH 06/16] Check that python & python3 point to the correct place --- scripts/install_python.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index 6f27f578..c56c5c9e 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -56,6 +56,11 @@ if [ "${UBUNTU_CODENAME}" == "focal" ]; then fi fi +# Check that python and python3 point to correct places +echo -e "Check python and python3 executables point to the correct place...\n" +which python +which python3 + # Check Python version echo -e "Check the Python to use with reticulate...\n" From ee5b9a8216782ee108b318722882e964dd931fcd Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 15:48:16 +0530 Subject: [PATCH 07/16] Prett-print python and python3 paths --- scripts/install_python.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index c56c5c9e..ac43565c 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -58,8 +58,8 @@ fi # Check that python and python3 point to correct places echo -e "Check python and python3 executables point to the correct place...\n" -which python -which python3 +echo -e "python -> $(which python)\n" +echo -e "python3 -> $(which python3)\n" # Check Python version echo -e "Check the Python to use with reticulate...\n" From 0bb27984ab9c7c9d361f783ecade6f184260c18d Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 16:09:27 +0530 Subject: [PATCH 08/16] Fix PATH export in install_python.sh --- scripts/install_python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index ac43565c..f9a8c6ef 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -26,7 +26,7 @@ apt_install \ # Put things under /opt/venv, if nothing else is specified export VIRTUAL_ENV="${VIRTUAL_ENV:=/opt/venv}" -export PATH="${VIRTUAL_ENV}:${PATH}" +export PATH="${VIRTUAL_ENV}/bin:${PATH}" python3 -m venv "${VIRTUAL_ENV}" From 541b676e78c3a75020accf8b40f52abda582bedc Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 16:14:43 +0530 Subject: [PATCH 09/16] Rely on echo putting a newline at the end automatically --- scripts/install_python.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index f9a8c6ef..6816b089 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -57,9 +57,9 @@ if [ "${UBUNTU_CODENAME}" == "focal" ]; then fi # Check that python and python3 point to correct places -echo -e "Check python and python3 executables point to the correct place...\n" -echo -e "python -> $(which python)\n" -echo -e "python3 -> $(which python3)\n" +echo "Check python and python3 executables point to the correct place..." +echo "python -> $(which python)" +echo "python3 -> $(which python3)" # Check Python version echo -e "Check the Python to use with reticulate...\n" From c1a472465532c8349cf0ad4f3f95c86e85787dc3 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 2 Nov 2023 23:40:42 +0530 Subject: [PATCH 10/16] Make sure RStudio sees new env vars we set --- scripts/install_python.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index 6816b089..e7953fa4 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -28,6 +28,10 @@ apt_install \ export VIRTUAL_ENV="${VIRTUAL_ENV:=/opt/venv}" export PATH="${VIRTUAL_ENV}/bin:${PATH}" +# Make sure that Rstudio sees these env vars too +echo "PATH=${PATH}" >>"${R_HOME}/etc/Renviron.site" +echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >>"${R_HOME}/etc/Renviron.site" + python3 -m venv "${VIRTUAL_ENV}" # Upgrade version of pip inside the virtualenv From ca9d697eb58ed5194433a290b3e70b3921ceea10 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:25:47 +0900 Subject: [PATCH 11/16] Automatic update of container definition files (#723) - Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- bakefiles/devel.docker-bake.json | 2 +- dockerfiles/cuda11_4.1.0.Dockerfile | 2 +- dockerfiles/cuda11_4.1.1.Dockerfile | 2 +- dockerfiles/cuda11_4.1.2.Dockerfile | 2 +- dockerfiles/cuda11_4.1.3.Dockerfile | 2 +- dockerfiles/cuda11_4.2.0.Dockerfile | 2 +- dockerfiles/cuda11_4.2.1.Dockerfile | 2 +- dockerfiles/cuda_4.2.2.Dockerfile | 2 +- dockerfiles/cuda_4.2.3.Dockerfile | 2 +- dockerfiles/cuda_4.3.0.Dockerfile | 2 +- dockerfiles/cuda_4.3.1.Dockerfile | 2 +- dockerfiles/cuda_4.3.2.Dockerfile | 2 +- dockerfiles/cuda_devel.Dockerfile | 2 +- dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile | 2 +- dockerfiles/r-ver_4.0.0.Dockerfile | 2 +- dockerfiles/r-ver_4.0.1.Dockerfile | 2 +- dockerfiles/r-ver_4.0.2.Dockerfile | 2 +- dockerfiles/r-ver_4.0.3.Dockerfile | 2 +- dockerfiles/r-ver_4.0.4.Dockerfile | 2 +- dockerfiles/r-ver_4.0.5.Dockerfile | 2 +- dockerfiles/r-ver_4.1.0.Dockerfile | 2 +- dockerfiles/r-ver_4.1.1.Dockerfile | 2 +- dockerfiles/r-ver_4.1.2.Dockerfile | 2 +- dockerfiles/r-ver_4.1.3.Dockerfile | 2 +- dockerfiles/r-ver_4.2.0.Dockerfile | 2 +- dockerfiles/r-ver_4.2.1.Dockerfile | 2 +- dockerfiles/r-ver_4.2.2.Dockerfile | 2 +- dockerfiles/r-ver_4.2.3.Dockerfile | 2 +- dockerfiles/r-ver_4.3.0.Dockerfile | 2 +- dockerfiles/r-ver_4.3.1.Dockerfile | 2 +- dockerfiles/r-ver_4.3.2.Dockerfile | 2 +- stacks/devel.json | 2 +- stacks/extra.json | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/bakefiles/devel.docker-bake.json b/bakefiles/devel.docker-bake.json index 354477ed..826fd11d 100644 --- a/bakefiles/devel.docker-bake.json +++ b/bakefiles/devel.docker-bake.json @@ -188,7 +188,7 @@ "labels": { "org.opencontainers.image.title": "rocker/cuda", "org.opencontainers.image.description": "NVIDIA CUDA libraries added to Rocker image.", - "org.opencontainers.image.base.name": "docker.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04" + "org.opencontainers.image.base.name": "docker.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu24.04" }, "tags": [ "docker.io/rocker/cuda:devel" diff --git a/dockerfiles/cuda11_4.1.0.Dockerfile b/dockerfiles/cuda11_4.1.0.Dockerfile index 3473eda9..c95eeb7f 100644 --- a/dockerfiles/cuda11_4.1.0.Dockerfile +++ b/dockerfiles/cuda11_4.1.0.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2021-08-09 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2021-08-09 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda11_4.1.1.Dockerfile b/dockerfiles/cuda11_4.1.1.Dockerfile index 21c59197..a4cc2c15 100644 --- a/dockerfiles/cuda11_4.1.1.Dockerfile +++ b/dockerfiles/cuda11_4.1.1.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2021-10-29 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2021-10-29 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda11_4.1.2.Dockerfile b/dockerfiles/cuda11_4.1.2.Dockerfile index b905ce85..5bef610e 100644 --- a/dockerfiles/cuda11_4.1.2.Dockerfile +++ b/dockerfiles/cuda11_4.1.2.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-03-09 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-03-09 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda11_4.1.3.Dockerfile b/dockerfiles/cuda11_4.1.3.Dockerfile index 34b7376b..a09a83d8 100644 --- a/dockerfiles/cuda11_4.1.3.Dockerfile +++ b/dockerfiles/cuda11_4.1.3.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-04-21 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-04-21 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda11_4.2.0.Dockerfile b/dockerfiles/cuda11_4.2.0.Dockerfile index 39c03d54..13209c94 100644 --- a/dockerfiles/cuda11_4.2.0.Dockerfile +++ b/dockerfiles/cuda11_4.2.0.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-06-22 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-06-22 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda11_4.2.1.Dockerfile b/dockerfiles/cuda11_4.2.1.Dockerfile index 3f9853e5..7b38e74f 100644 --- a/dockerfiles/cuda11_4.2.1.Dockerfile +++ b/dockerfiles/cuda11_4.2.1.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-10-28 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-10-28 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda_4.2.2.Dockerfile b/dockerfiles/cuda_4.2.2.Dockerfile index 5ac9770c..3d909e4a 100644 --- a/dockerfiles/cuda_4.2.2.Dockerfile +++ b/dockerfiles/cuda_4.2.2.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-03-14 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-03-14 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda_4.2.3.Dockerfile b/dockerfiles/cuda_4.2.3.Dockerfile index 2ffc870b..c85fbdeb 100644 --- a/dockerfiles/cuda_4.2.3.Dockerfile +++ b/dockerfiles/cuda_4.2.3.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-04-20 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-04-20 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda_4.3.0.Dockerfile b/dockerfiles/cuda_4.3.0.Dockerfile index efeddf46..47c15baf 100644 --- a/dockerfiles/cuda_4.3.0.Dockerfile +++ b/dockerfiles/cuda_4.3.0.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-06-15 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-06-15 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda_4.3.1.Dockerfile b/dockerfiles/cuda_4.3.1.Dockerfile index d9329b8f..52516dc9 100644 --- a/dockerfiles/cuda_4.3.1.Dockerfile +++ b/dockerfiles/cuda_4.3.1.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-10-30 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-10-30 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda_4.3.2.Dockerfile b/dockerfiles/cuda_4.3.2.Dockerfile index 44bd2001..92861572 100644 --- a/dockerfiles/cuda_4.3.2.Dockerfile +++ b/dockerfiles/cuda_4.3.2.Dockerfile @@ -17,7 +17,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/latest +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/latest ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/cuda_devel.Dockerfile b/dockerfiles/cuda_devel.Dockerfile index efc49de8..dfafe70e 100644 --- a/dockerfiles/cuda_devel.Dockerfile +++ b/dockerfiles/cuda_devel.Dockerfile @@ -1,4 +1,4 @@ -FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 +FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu24.04 LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \ org.opencontainers.image.source="https://github.com/rocker-org/rocker-versioned2" \ diff --git a/dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile b/dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile index 9cf6f818..13907c90 100644 --- a/dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile +++ b/dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \ org.opencontainers.image.authors="Carl Boettiger " ENV PROJ_VERSION=9.3.0 -ENV GDAL_VERSION=3.7.2 +ENV GDAL_VERSION=3.7.3 ENV GEOS_VERSION=3.12.0 COPY scripts/experimental/install_dev_osgeo.sh /rocker_scripts/experimental/install_dev_osgeo.sh diff --git a/dockerfiles/r-ver_4.0.0.Dockerfile b/dockerfiles/r-ver_4.0.0.Dockerfile index b765ebc1..72a441e3 100644 --- a/dockerfiles/r-ver_4.0.0.Dockerfile +++ b/dockerfiles/r-ver_4.0.0.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2020-06-04 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2020-06-04 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.0.1.Dockerfile b/dockerfiles/r-ver_4.0.1.Dockerfile index a39d2d54..d13b4b58 100644 --- a/dockerfiles/r-ver_4.0.1.Dockerfile +++ b/dockerfiles/r-ver_4.0.1.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2020-06-18 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2020-06-18 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.0.2.Dockerfile b/dockerfiles/r-ver_4.0.2.Dockerfile index 33c9dd9e..5132a6a7 100644 --- a/dockerfiles/r-ver_4.0.2.Dockerfile +++ b/dockerfiles/r-ver_4.0.2.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2020-10-09 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2020-10-09 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.0.3.Dockerfile b/dockerfiles/r-ver_4.0.3.Dockerfile index f042249a..8922962a 100644 --- a/dockerfiles/r-ver_4.0.3.Dockerfile +++ b/dockerfiles/r-ver_4.0.3.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2021-02-11 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2021-02-11 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.0.4.Dockerfile b/dockerfiles/r-ver_4.0.4.Dockerfile index 88d2fe23..f044e6e7 100644 --- a/dockerfiles/r-ver_4.0.4.Dockerfile +++ b/dockerfiles/r-ver_4.0.4.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2021-03-30 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2021-03-30 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.0.5.Dockerfile b/dockerfiles/r-ver_4.0.5.Dockerfile index 2dfdbe50..85f6cdad 100644 --- a/dockerfiles/r-ver_4.0.5.Dockerfile +++ b/dockerfiles/r-ver_4.0.5.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2021-05-17 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2021-05-17 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.1.0.Dockerfile b/dockerfiles/r-ver_4.1.0.Dockerfile index 23e70440..c0d7c9e4 100644 --- a/dockerfiles/r-ver_4.1.0.Dockerfile +++ b/dockerfiles/r-ver_4.1.0.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2021-08-09 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2021-08-09 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.1.1.Dockerfile b/dockerfiles/r-ver_4.1.1.Dockerfile index f492b2da..7d5b3b31 100644 --- a/dockerfiles/r-ver_4.1.1.Dockerfile +++ b/dockerfiles/r-ver_4.1.1.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2021-10-29 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2021-10-29 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.1.2.Dockerfile b/dockerfiles/r-ver_4.1.2.Dockerfile index 2b3b87ce..4b6d2e73 100644 --- a/dockerfiles/r-ver_4.1.2.Dockerfile +++ b/dockerfiles/r-ver_4.1.2.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-03-09 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-03-09 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.1.3.Dockerfile b/dockerfiles/r-ver_4.1.3.Dockerfile index 655da427..7f8f780e 100644 --- a/dockerfiles/r-ver_4.1.3.Dockerfile +++ b/dockerfiles/r-ver_4.1.3.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-04-21 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-04-21 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.2.0.Dockerfile b/dockerfiles/r-ver_4.2.0.Dockerfile index bf9f8b04..a6faee6e 100644 --- a/dockerfiles/r-ver_4.2.0.Dockerfile +++ b/dockerfiles/r-ver_4.2.0.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-06-22 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-06-22 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.2.1.Dockerfile b/dockerfiles/r-ver_4.2.1.Dockerfile index 91fec69a..2caf094f 100644 --- a/dockerfiles/r-ver_4.2.1.Dockerfile +++ b/dockerfiles/r-ver_4.2.1.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/focal/2022-10-28 +ENV CRAN=https://p3m.dev/cran/__linux__/focal/2022-10-28 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.2.2.Dockerfile b/dockerfiles/r-ver_4.2.2.Dockerfile index 7d6485d7..c8bd137a 100644 --- a/dockerfiles/r-ver_4.2.2.Dockerfile +++ b/dockerfiles/r-ver_4.2.2.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-03-14 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-03-14 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.2.3.Dockerfile b/dockerfiles/r-ver_4.2.3.Dockerfile index d90fee01..ea309050 100644 --- a/dockerfiles/r-ver_4.2.3.Dockerfile +++ b/dockerfiles/r-ver_4.2.3.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-04-20 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-04-20 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.3.0.Dockerfile b/dockerfiles/r-ver_4.3.0.Dockerfile index ce39423a..1e54094e 100644 --- a/dockerfiles/r-ver_4.3.0.Dockerfile +++ b/dockerfiles/r-ver_4.3.0.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-06-15 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-06-15 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.3.1.Dockerfile b/dockerfiles/r-ver_4.3.1.Dockerfile index 88258fe6..b6092745 100644 --- a/dockerfiles/r-ver_4.3.1.Dockerfile +++ b/dockerfiles/r-ver_4.3.1.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-10-30 +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/2023-10-30 ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/dockerfiles/r-ver_4.3.2.Dockerfile b/dockerfiles/r-ver_4.3.2.Dockerfile index fe5f9726..5cf45095 100644 --- a/dockerfiles/r-ver_4.3.2.Dockerfile +++ b/dockerfiles/r-ver_4.3.2.Dockerfile @@ -13,7 +13,7 @@ COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh RUN /rocker_scripts/install_R_source.sh -ENV CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/latest +ENV CRAN=https://p3m.dev/cran/__linux__/jammy/latest ENV LANG=en_US.UTF-8 COPY scripts /rocker_scripts diff --git a/stacks/devel.json b/stacks/devel.json index 6b0b5f36..8f2bd268 100644 --- a/stacks/devel.json +++ b/stacks/devel.json @@ -148,7 +148,7 @@ "org.opencontainers.image.title": "rocker/cuda", "org.opencontainers.image.description": "NVIDIA CUDA libraries added to Rocker image." }, - "FROM": "nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04", + "FROM": "nvidia/cuda:11.8.0-cudnn8-devel-ubuntu24.04", "ENV": { "R_VERSION": "devel", "R_HOME": "/usr/local/lib/R", diff --git a/stacks/extra.json b/stacks/extra.json index eeb6897f..6e62b86f 100644 --- a/stacks/extra.json +++ b/stacks/extra.json @@ -58,7 +58,7 @@ "FROM": "rocker/verse:4.3.2", "ENV": { "PROJ_VERSION": "9.3.0", - "GDAL_VERSION": "3.7.2", + "GDAL_VERSION": "3.7.3", "GEOS_VERSION": "3.12.0" }, "COPY": "scripts/experimental/install_dev_osgeo.sh /rocker_scripts/experimental/install_dev_osgeo.sh", From aa601a22cda114e6888c06c410d1cd9de8af0427 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 11:00:58 -0800 Subject: [PATCH 12/16] Swap the order of ${VIRTUAL_ENV}/bin --- dockerfiles/binder_devel.Dockerfile | 2 +- stacks/devel.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/binder_devel.Dockerfile b/dockerfiles/binder_devel.Dockerfile index 524b5199..591d79bc 100644 --- a/dockerfiles/binder_devel.Dockerfile +++ b/dockerfiles/binder_devel.Dockerfile @@ -7,7 +7,7 @@ LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \ ENV NB_USER=rstudio ENV VIRTUAL_ENV=/opt/venv -ENV PATH=${PATH}:${VIRTUAL_ENV}/bin +ENV PATH=${VIRTUAL_ENV}/bin:${PATH} RUN /rocker_scripts/install_jupyter.sh diff --git a/stacks/devel.json b/stacks/devel.json index 8f2bd268..0dc31365 100644 --- a/stacks/devel.json +++ b/stacks/devel.json @@ -129,7 +129,7 @@ "ENV": { "NB_USER": "rstudio", "VIRTUAL_ENV": "/opt/venv", - "PATH": "${PATH}:${VIRTUAL_ENV}/bin" + "PATH": "${VIRTUAL_ENV}/bin:${PATH}" }, "RUN": [ "/rocker_scripts/install_jupyter.sh" From c33f53cf9e939836a33a9160912a8d6d84a8e57f Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 11:06:48 -0800 Subject: [PATCH 13/16] Check that pip points to the correct place too --- scripts/install_python.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index e7953fa4..171b96f1 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -61,9 +61,10 @@ if [ "${UBUNTU_CODENAME}" == "focal" ]; then fi # Check that python and python3 point to correct places -echo "Check python and python3 executables point to the correct place..." +echo "Check python, python3 and pip executables point to the correct place..." echo "python -> $(which python)" echo "python3 -> $(which python3)" +echo "pip -> $(which pip)" # Check Python version echo -e "Check the Python to use with reticulate...\n" From 96cdc36e3c6dcd17e7eb4b830ebd7d8147aedf51 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 11:08:57 -0800 Subject: [PATCH 14/16] Make the venv be owned by non-root user --- scripts/install_python.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index 171b96f1..974a474b 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -38,6 +38,10 @@ python3 -m venv "${VIRTUAL_ENV}" python3 -m pip --no-cache-dir install --upgrade \ pip +# Make the venv owned by the staff group, so users can install packages +# without having to be root +chown -R rstudio:staff /opt/venv + install2.r --error --skipmissing --skipinstalled -n "$NCPUS" reticulate # Clean up From 91622811207cd4296a0cd11919eb77b92c0e4f8b Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 15:04:56 -0800 Subject: [PATCH 15/16] Set permissions + ownership correctly for venv dir --- scripts/install_python.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install_python.sh b/scripts/install_python.sh index 974a474b..a2add4da 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -40,7 +40,8 @@ python3 -m pip --no-cache-dir install --upgrade \ # Make the venv owned by the staff group, so users can install packages # without having to be root -chown -R rstudio:staff /opt/venv +chown -R root:staff "${VIRTUAL_ENV}" +chmod g+ws "${VIRTUAL_ENV}" install2.r --error --skipmissing --skipinstalled -n "$NCPUS" reticulate From bda44e6c416c0250ed86483fd731cb817c29a2d6 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 20 Dec 2023 20:57:16 -0800 Subject: [PATCH 16/16] Add NEWS entry --- NEWS.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/NEWS.md b/NEWS.md index 491b9a11..8704bde5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,20 @@ # News +## 2023-12 + +### Changes in pre-built images + +- For images that ship with a python environment installed, the default python + environment will now be a [virtual environment](https://docs.python.org/3/library/venv.html) + created at `/opt/venv`. ([#718](https://github.com/rocker-org/rocker-versioned2/pull/718)) + +### Changes in rocker_scripts + +- `install_python.sh` will now setup a [virtual environment](https://docs.python.org/3/library/venv.html) + under `/opt/venv`, and this will be the default python environment (accomplished via setting + the `$PATH` and `$VIRTUAL_ENV` variables). `/opt/venv` will be owned by the `staff` group so non-root + users can safely install python packages. ([#718](https://github.com/rocker-org/rocker-versioned2/pull/718)) + ## 2023-11 ### Changes in pre-built images