File tree Expand file tree Collapse file tree 9 files changed +27
-9
lines changed Expand file tree Collapse file tree 9 files changed +27
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ ENV TZ=Etc/UTC
11
11
ENV NVBLAS_CONFIG_FILE=/etc/nvblas.conf
12
12
ENV PYTHON_CONFIGURE_OPTS=--enable-shared
13
13
ENV RETICULATE_AUTOCONFIGURE=0
14
- ENV PATH=${PATH}:${CUDA_HOME}/bin
14
+ ENV PURGE_BUILDDEPS=false
15
+ ENV VIRTUAL_ENV=/opt/venv
16
+ ENV PATH=${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin
15
17
16
18
COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh
17
19
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ ENV TZ=Etc/UTC
11
11
ENV NVBLAS_CONFIG_FILE=/etc/nvblas.conf
12
12
ENV PYTHON_CONFIGURE_OPTS=--enable-shared
13
13
ENV RETICULATE_AUTOCONFIGURE=0
14
- ENV PATH=${PATH}:${CUDA_HOME}/bin
14
+ ENV PURGE_BUILDDEPS=false
15
+ ENV VIRTUAL_ENV=/opt/venv
16
+ ENV PATH=${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin
15
17
16
18
COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh
17
19
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ ENV TZ=Etc/UTC
11
11
ENV NVBLAS_CONFIG_FILE=/etc/nvblas.conf
12
12
ENV PYTHON_CONFIGURE_OPTS=--enable-shared
13
13
ENV RETICULATE_AUTOCONFIGURE=0
14
- ENV PATH=${PATH}:${CUDA_HOME}/bin
14
+ ENV PURGE_BUILDDEPS=false
15
+ ENV VIRTUAL_ENV=/opt/venv
16
+ ENV PATH=${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin
15
17
16
18
COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh
17
19
Original file line number Diff line number Diff line change 11
11
set -e
12
12
13
13
R_VERSION=${1:- ${R_VERSION:- " latest" } }
14
+ PURGE_BUILDDEPS=${PURGE_BUILDDEPS=-" true" }
14
15
15
16
# shellcheck source=/dev/null
16
17
source /etc/os-release
@@ -158,7 +159,9 @@ rm -rf "R.tar.gz"
158
159
cp /usr/bin/checkbashisms /usr/local/bin/checkbashisms
159
160
160
161
# shellcheck disable=SC2086
161
- apt-get remove --purge -y ${BUILDDEPS}
162
+ if [ " ${PURGE_BUILDDEPS} " == " true" ]; then
163
+ apt-get remove --purge -y ${BUILDDEPS}
164
+ fi
162
165
apt-get autoremove -y
163
166
apt-get autoclean -y
164
167
rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ python3 -m pip --no-cache-dir install --upgrade \
41
41
# Make the venv owned by the staff group, so users can install packages
42
42
# without having to be root
43
43
chown -R root:staff " ${VIRTUAL_ENV} "
44
- chmod g+ws " ${VIRTUAL_ENV} "
44
+ chmod -R g+ws " ${VIRTUAL_ENV} "
45
45
46
46
install2.r --error --skipmissing --skipinstalled -n " $NCPUS " reticulate
47
47
Original file line number Diff line number Diff line change 10
10
set -e
11
11
12
12
CRAN=${1:- ${CRAN:- " https://cran.r-project.org" } }
13
+ PURGE_BUILDDEPS=${PURGE_BUILDDEPS=-" true" }
13
14
14
15
ARCH=$( uname -m)
15
16
@@ -68,7 +69,9 @@ if [ ! -x "$(command -v r)" ]; then
68
69
69
70
# Clean up
70
71
# shellcheck disable=SC2086
71
- apt-get remove --purge -y ${BUILDDEPS}
72
+ if [ " ${PURGE_BUILDDEPS} " == " true" ]; then
73
+ apt-get remove --purge -y ${BUILDDEPS}
74
+ fi
72
75
apt-get autoremove -y
73
76
apt-get autoclean -y
74
77
fi
Original file line number Diff line number Diff line change 203
203
"NVBLAS_CONFIG_FILE" : " /etc/nvblas.conf" ,
204
204
"PYTHON_CONFIGURE_OPTS" : " --enable-shared" ,
205
205
"RETICULATE_AUTOCONFIGURE" : " 0" ,
206
- "PATH" : " ${PATH}:${CUDA_HOME}/bin"
206
+ "PURGE_BUILDDEPS" : " false" ,
207
+ "VIRTUAL_ENV" : " /opt/venv" ,
208
+ "PATH" : " ${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin"
207
209
},
208
210
"COPY_a_script" : " scripts/install_R_source.sh /rocker_scripts/install_R_source.sh" ,
209
211
"RUN_a_script" : " /rocker_scripts/install_R_source.sh" ,
Original file line number Diff line number Diff line change 257
257
"NVBLAS_CONFIG_FILE" : " /etc/nvblas.conf" ,
258
258
"PYTHON_CONFIGURE_OPTS" : " --enable-shared" ,
259
259
"RETICULATE_AUTOCONFIGURE" : " 0" ,
260
- "PATH" : " ${PATH}:${CUDA_HOME}/bin"
260
+ "PURGE_BUILDDEPS" : " false" ,
261
+ "VIRTUAL_ENV" : " /opt/venv" ,
262
+ "PATH" : " ${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin"
261
263
},
262
264
"COPY_a_script" : " scripts/install_R_source.sh /rocker_scripts/install_R_source.sh" ,
263
265
"RUN_a_script" : " /rocker_scripts/install_R_source.sh" ,
Original file line number Diff line number Diff line change 156
156
"NVBLAS_CONFIG_FILE" : " /etc/nvblas.conf" ,
157
157
"PYTHON_CONFIGURE_OPTS" : " --enable-shared" ,
158
158
"RETICULATE_AUTOCONFIGURE" : " 0" ,
159
- "PATH" : " ${PATH}:${CUDA_HOME}/bin"
159
+ "PURGE_BUILDDEPS" : " false" ,
160
+ "VIRTUAL_ENV" : " /opt/venv" ,
161
+ "PATH" : " ${PATH}:${VIRTUAL_ENV}/bin:${CUDA_HOME}/bin"
160
162
},
161
163
"COPY_a_script" : " scripts/install_R_source.sh /rocker_scripts/install_R_source.sh" ,
162
164
"RUN_a_script" : " /rocker_scripts/install_R_source.sh" ,
You can’t perform that action at this time.
0 commit comments