Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch cuda dev tools (#736) #743

Merged
merged 11 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion dockerfiles/geospatial-dev-osgeo_4.3.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.authors="Carl Boettiger <[email protected]>"

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
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"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe typo?
PURGE_BUILDDEPS=${PURGE_BUILDDEPS:-"true"}


# shellcheck source=/dev/null
source /etc/os-release
Expand Down Expand Up @@ -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/*
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
eitsupi marked this conversation as resolved.
Show resolved Hide resolved
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed! will be nice to have /opt/venv work on these images.

"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
2 changes: 1 addition & 1 deletion stacks/extra.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading