-
Notifications
You must be signed in to change notification settings - Fork 184
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
Changes from 7 commits
f15c188
54a4a09
c06a086
c1c7b0e
768598c
dd05a7c
a19206c
02951ef
0382082
bba4a6e
18d9daf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eitsupi you said:
I am adding a flag to install_R_source.sh right here though. what two files are you referring two as almost identical copies? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps the assumptions were not engaged. I had imagined something like the following: FROM rocker/r-ver:4.3.2 as builder
FROM FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
COPY --from=builder /foo/bar
COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh
# should install the necessary packages, but should skip building R
ENV SKIP_BUILD_R="true"
RUN /rocker_scripts/install_R_source.sh There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I see what you mean. That looks rather more complicated though.
What's the downside of the approach here? I still don't see what's been duplicated. |
||
apt-get remove --purge -y ${BUILDDEPS} | ||
fi | ||
apt-get autoremove -y | ||
apt-get autoclean -y | ||
rm -rf /var/lib/apt/lists/* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hah! There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -148,15 +148,17 @@ | |||||||||||||||||||||||
"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-ubuntu24.04", | ||||||||||||||||||||||||
"FROM": "nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04", | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I remember correctly, this value is updated by the script, so don't update it here manually. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wondered about this when the script added it. Are we sure a) the production cycle for Ubuntu 24.04 has started and b) that NVidia already publishes to it? I was under the impression NVidia was particularly 'laggy' ie the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no
See https://gitlab.com/nvidia/container-images/cuda/-/tree/master/dist/11.8.0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks all. @eitsupi can you clarify? If this field is not read because it is provided by the script then maybe we can drop it or stick in a dummy value? It seems needlessly confusing to reference a value that isn't going to be used and isn't actually a valid image name but just happens to look almost like a valid image name, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I mean is "not read", but "don't set it manually, because if the script is execute by CI, it will be updated". The priority here is to use the same Ubuntu version as Currently pointing to Ubuntu 24.04 is not as intended, I really wanted it to be 22.04, which is the same as the current rocker-versioned2/stacks/devel.json Line 26 in 7d08837
rocker-versioned2/build/make-stacks.R Lines 449 to 450 in 7d08837
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right, so it now reads 22.04, and I think should work as intended. let me know if anything needs to be changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Run the scripts to update the files. It should be back. rocker-versioned2/build/README.md Lines 5 to 12 in 7d08837
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eitsupi ok I see what you mean, I've just pushed an edit to roll that back. I thought I fixed whitespace but am still struggling with the linter :-( |
||||||||||||||||||||||||
"ENV": { | ||||||||||||||||||||||||
"R_VERSION": "devel", | ||||||||||||||||||||||||
"R_HOME": "/usr/local/lib/R", | ||||||||||||||||||||||||
"TZ": "Etc/UTC", | ||||||||||||||||||||||||
"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", | ||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think bools in env vars should be
"true"
or"false"
, not"TRUE"
or"FALSE"
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think env vars are untyped so 1 and "1" and "TRUE" and "True" and "true" are all the same. Unless, of course, the receiving end makes a difference when it parses. Otherwise the check is commonly 'set or not set'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a common practice in shell script?
I saw in bash:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, but as you I did this a string comparison since booleans in bash always confuse me. Anyway I've changed these to lower-case now. Thanks for catching this! let me know if you'd recommend further changes here.