Skip to content

Commit

Permalink
Patch cuda dev tools (#736) (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig authored Jan 23, 2024
2 parents 7d08837 + 18d9daf commit 96f7241
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 9 deletions.
4 changes: 3 additions & 1 deletion dockerfiles/cuda_4.3.1.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion dockerfiles/cuda_4.3.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion dockerfiles/cuda_devel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion scripts/install_R_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -158,7 +159,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/*
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion scripts/setup_R.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
set -e

CRAN=${1:-${CRAN:-"https://cran.r-project.org"}}
PURGE_BUILDDEPS=${PURGE_BUILDDEPS=-"true"}

ARCH=$(uname -m)

Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion stacks/4.3.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion stacks/4.3.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion stacks/devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 96f7241

Please sign in to comment.