diff --git a/dockerfiles/cuda_4.3.1.Dockerfile b/dockerfiles/cuda_4.3.1.Dockerfile index 52516dc9..6bb5fdfc 100644 --- a/dockerfiles/cuda_4.3.1.Dockerfile +++ b/dockerfiles/cuda_4.3.1.Dockerfile @@ -11,7 +11,9 @@ ENV TZ=Etc/UTC ENV NVBLAS_CONFIG_FILE=/etc/nvblas.conf ENV PYTHON_CONFIGURE_OPTS=--enable-shared ENV RETICULATE_AUTOCONFIGURE=0 -ENV PATH=${PATH}:${CUDA_HOME}/bin +ENV PURGE_BUILDDEPS=false +ENV VIRTUAL_ENV=/opt/venv +ENV PATH=${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh diff --git a/dockerfiles/cuda_4.3.2.Dockerfile b/dockerfiles/cuda_4.3.2.Dockerfile index 92861572..2a49c457 100644 --- a/dockerfiles/cuda_4.3.2.Dockerfile +++ b/dockerfiles/cuda_4.3.2.Dockerfile @@ -11,7 +11,9 @@ ENV TZ=Etc/UTC ENV NVBLAS_CONFIG_FILE=/etc/nvblas.conf ENV PYTHON_CONFIGURE_OPTS=--enable-shared ENV RETICULATE_AUTOCONFIGURE=0 -ENV PATH=${PATH}:${CUDA_HOME}/bin +ENV PURGE_BUILDDEPS=false +ENV VIRTUAL_ENV=/opt/venv +ENV PATH=${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh diff --git a/dockerfiles/cuda_devel.Dockerfile b/dockerfiles/cuda_devel.Dockerfile index dfafe70e..75eb0dcf 100644 --- a/dockerfiles/cuda_devel.Dockerfile +++ b/dockerfiles/cuda_devel.Dockerfile @@ -11,7 +11,9 @@ ENV TZ=Etc/UTC ENV NVBLAS_CONFIG_FILE=/etc/nvblas.conf ENV PYTHON_CONFIGURE_OPTS=--enable-shared ENV RETICULATE_AUTOCONFIGURE=0 -ENV PATH=${PATH}:${CUDA_HOME}/bin +ENV PURGE_BUILDDEPS=false +ENV VIRTUAL_ENV=/opt/venv +ENV PATH=${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh diff --git a/dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile b/dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile index 63b73b61..8c9e6d13 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.1 -ENV GDAL_VERSION=3.8.2 +ENV GDAL_VERSION=3.8.3 ENV GEOS_VERSION=3.12.1 COPY scripts/experimental/install_dev_osgeo.sh /rocker_scripts/experimental/install_dev_osgeo.sh diff --git a/scripts/install_R_source.sh b/scripts/install_R_source.sh index d6e4e3f2..9bedb5b1 100755 --- a/scripts/install_R_source.sh +++ b/scripts/install_R_source.sh @@ -11,6 +11,7 @@ set -e R_VERSION=${1:-${R_VERSION:-"latest"}} +PURGE_BUILDDEPS=${PURGE_BUILDDEPS=-"true"} # shellcheck source=/dev/null source /etc/os-release @@ -157,7 +158,9 @@ rm -rf "R.tar.gz" cp /usr/bin/checkbashisms /usr/local/bin/checkbashisms # shellcheck disable=SC2086 -apt-get remove --purge -y ${BUILDDEPS} +if [ "${PURGE_BUILDDEPS}" == "true" ]; then + apt-get remove --purge -y ${BUILDDEPS} +fi apt-get autoremove -y apt-get autoclean -y rm -rf /var/lib/apt/lists/* diff --git a/scripts/install_python.sh b/scripts/install_python.sh index a2add4da..9f2865da 100755 --- a/scripts/install_python.sh +++ b/scripts/install_python.sh @@ -41,7 +41,7 @@ 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 root:staff "${VIRTUAL_ENV}" -chmod g+ws "${VIRTUAL_ENV}" +chmod -R g+ws "${VIRTUAL_ENV}" install2.r --error --skipmissing --skipinstalled -n "$NCPUS" reticulate diff --git a/scripts/setup_R.sh b/scripts/setup_R.sh index d90abb52..9c68cc7c 100755 --- a/scripts/setup_R.sh +++ b/scripts/setup_R.sh @@ -10,6 +10,7 @@ set -e CRAN=${1:-${CRAN:-"https://cran.r-project.org"}} +PURGE_BUILDDEPS=${PURGE_BUILDDEPS=-"true"} ARCH=$(uname -m) @@ -68,7 +69,9 @@ if [ ! -x "$(command -v r)" ]; then # Clean up # shellcheck disable=SC2086 - apt-get remove --purge -y ${BUILDDEPS} + if [ "${PURGE_BUILDDEPS}" == "true" ]; then + apt-get remove --purge -y ${BUILDDEPS} + fi apt-get autoremove -y apt-get autoclean -y fi diff --git a/stacks/4.3.1.json b/stacks/4.3.1.json index c81af409..6d419ef6 100644 --- a/stacks/4.3.1.json +++ b/stacks/4.3.1.json @@ -203,7 +203,9 @@ "NVBLAS_CONFIG_FILE": "/etc/nvblas.conf", "PYTHON_CONFIGURE_OPTS": "--enable-shared", "RETICULATE_AUTOCONFIGURE": "0", - "PATH": "${PATH}:${CUDA_HOME}/bin" + "PURGE_BUILDDEPS": "false", + "VIRTUAL_ENV": "/opt/venv", + "PATH": "${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin" }, "COPY_a_script": "scripts/install_R_source.sh /rocker_scripts/install_R_source.sh", "RUN_a_script": "/rocker_scripts/install_R_source.sh", diff --git a/stacks/4.3.2.json b/stacks/4.3.2.json index 5c0ceb77..33dc8e68 100644 --- a/stacks/4.3.2.json +++ b/stacks/4.3.2.json @@ -257,7 +257,9 @@ "NVBLAS_CONFIG_FILE": "/etc/nvblas.conf", "PYTHON_CONFIGURE_OPTS": "--enable-shared", "RETICULATE_AUTOCONFIGURE": "0", - "PATH": "${PATH}:${CUDA_HOME}/bin" + "PURGE_BUILDDEPS": "false", + "VIRTUAL_ENV": "/opt/venv", + "PATH": "${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin" }, "COPY_a_script": "scripts/install_R_source.sh /rocker_scripts/install_R_source.sh", "RUN_a_script": "/rocker_scripts/install_R_source.sh", diff --git a/stacks/devel.json b/stacks/devel.json index 8637af99..b58bd3e1 100644 --- a/stacks/devel.json +++ b/stacks/devel.json @@ -156,7 +156,9 @@ "NVBLAS_CONFIG_FILE": "/etc/nvblas.conf", "PYTHON_CONFIGURE_OPTS": "--enable-shared", "RETICULATE_AUTOCONFIGURE": "0", - "PATH": "${PATH}:${CUDA_HOME}/bin" + "PURGE_BUILDDEPS": "false", + "VIRTUAL_ENV": "/opt/venv", + "PATH": "${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin" }, "COPY_a_script": "scripts/install_R_source.sh /rocker_scripts/install_R_source.sh", "RUN_a_script": "/rocker_scripts/install_R_source.sh", diff --git a/stacks/extra.json b/stacks/extra.json index 0a182449..b2f32e7c 100644 --- a/stacks/extra.json +++ b/stacks/extra.json @@ -58,7 +58,7 @@ "FROM": "rocker/verse:4.3.2", "ENV": { "PROJ_VERSION": "9.3.1", - "GDAL_VERSION": "3.8.2", + "GDAL_VERSION": "3.8.3", "GEOS_VERSION": "3.12.1" }, "COPY": "scripts/experimental/install_dev_osgeo.sh /rocker_scripts/experimental/install_dev_osgeo.sh",