Skip to content

Add dockerfile for rocky8 based cuda container, which supports cudnn 9.1.1 #635

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

Merged
merged 2 commits into from
Mar 20, 2025

Conversation

danpetry
Copy link
Member

@danpetry danpetry commented Mar 14, 2025

The reason for this was because a higher glibc version was required compared with the existing cuda docker container.

This dockerfile was used to build a container that was used to build pytorch 2.5.1 linux cuda variant. This PR is to merge this for provenance. It doesn't include a github action to build and upload the container, as it's not publicly needed yet.

Rocky was chosen among the available platforms because it resulted in less adaptation needed from the current cuda recipe compared with ubi, and was more lightweight than ubuntu. v8 was chosen over v9 because it had a lower glibc version and I didn't need the later one.

@danpetry danpetry requested review from Callek and marcoesters March 14, 2025 19:00
@Callek
Copy link

Callek commented Mar 14, 2025

Would adapting a slight change ontop of https://github.com/anaconda/docker-images/blob/main/anaconda-pkg-build/linux/alma/Dockerfile be better?

I like rocky myself, but I think we want to avoid os sprawl in this space, and interested if there are specific needs for one vs the other.

Also note that there were issues using latest miniconda for alma [offhand i forget why]

@danpetry
Copy link
Member Author

the nvidia cuda base containers are only available in ubi, rocky or ubuntu variants

@dbast
Copy link
Member

dbast commented Mar 17, 2025

@danpetry how is conda-forge dealing with that?

RUN curl -sSL -o /tmp/miniconda.sh \
"https://repo.anaconda.com/miniconda/Miniconda3-${INSTALLER_VERSION}-Linux-$(uname -m)".sh \
&& sha256sum /tmp/miniconda.sh \
&& /bin/bash /tmp/miniconda.sh -bfp /opt/conda \

Choose a reason for hiding this comment

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

Very minor feedback - can we use full flags if they exist? (example -bfp)

Copy link
Member Author

@danpetry danpetry Mar 19, 2025

Choose a reason for hiding this comment

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

They don't exist - from the installer file:

Installs ${INSTALLER_NAME} ${INSTALLER_VER}

-b           run install in batch mode (without manual intervention),
             it is expected the license terms (if any) are agreed upon
-f           no error if install prefix already exists
-h           print this help message and exit
-p PREFIX    install prefix, defaults to $PREFIX, must not contain spaces.
-s           skip running pre/post-link/install scripts
-m           disable the creation of menu items / shortcuts
-u           update an existing installation
-t           run package tests after installation (may install conda-build)
"

# We used to have a getopt version here, falling back to getopts if needed
# However getopt is not standardized and the version on Mac has different
# behaviour. getopts is good enough for what we need :)
# More info: https://unix.stackexchange.com/questions/62950/
while getopts "bifhkp:smut" x; do
    case "$x" in
        h)

etc...

The other ones I can see are from pretty common bash programs (rm -fv, curl -sSL, chown -R ...) so not sure if it's worth the time to expand, happy to do so if you can see any in particular that need to be?

Choose a reason for hiding this comment

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

Oh right! It's probably busybox, that makes sense. Carry on! 🚀 🍰

@scotthain
Copy link

Went through the code with @ELundby45 - looks good to me from a code level, good questions being asked though!

@danpetry
Copy link
Member Author

@dbast they use the ubi8 base image. I didn't see a practical reason to choose ubi 8 over rocky 8. LMK if there is one.

@danpetry
Copy link
Member Author

Any re-reviews/approvals please?

@danpetry danpetry merged commit 6e3c308 into main Mar 20, 2025
1 check passed
@danpetry danpetry deleted the cuda-rocky8 branch March 20, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants