Skip to content

Speed up installing CUDA on CI #149

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

Open
LegNeato opened this issue Mar 7, 2025 · 5 comments · Fixed by #189 or #188
Open

Speed up installing CUDA on CI #149

LegNeato opened this issue Mar 7, 2025 · 5 comments · Fixed by #189 or #188
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@LegNeato
Copy link
Contributor

LegNeato commented Mar 7, 2025

CUDA takes a long time to install on CI. We're using an existing github action. See if we can speed it up or do something custom to make CI faster.

@LegNeato LegNeato added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 7, 2025
@LegNeato
Copy link
Contributor Author

Hmm, it seems this is now cached and is fast?

@Schmiedium
Copy link
Contributor

Schmiedium commented Mar 15, 2025

On this topic, I just finished building a docker image with CUDA and LLVM 7 baked into it. I have one made for ubuntu 20.04, and I've tested that it's able to build the project just fine. I'm going to see about publishing the image and using it for CI on my fork, hopefully it speeds that up some.

I'm going to do the same thing for a windows image, I think that'll let me figure out how to get some the environment variables in the windows runners working correctly too. The windows CI seems to be failing with some link errors that I don't run into locally.

I'm going to include the docker files in the repo, so that way people can rebuild the image locally or wherever they want

I did notice that when the CUDA install is cached, it goes much faster. I still think we can speed it up by baking in CUDA directly.

@LegNeato

This comment has been minimized.

@jorge-ortega
Copy link
Collaborator

jorge-ortega commented Apr 3, 2025

CUDA install on Windows is still really slow, up 15 minutes sometime. We could benefit switching to the network installer (should be smaller and cacheable) and specifying the sub-packages12 needed to build our crates.

Footnotes

  1. https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#id3

  2. https://github.com/Jimver/cuda-toolkit/tree/v0.2.22/?tab=readme-ov-file#sub-packages

@Glatzel
Copy link

Glatzel commented May 12, 2025

Using conda to install cuda in windows is much faster than downloading and installing the official installer, and could choose which package to install. In my case, I use pixi to install the minimal cuda package for compiling ptx files, and conda environment is easy to cache in CI. You can also use other conda package manager like miniconda or manba. But the drawback is you have to configure the cuda env variable by yourself.

This is my pixi config file.

[workspace]
channels = ["conda-forge", "nvidia"]
platforms = ["win-64", "linux-64"]

[tasks]
nvcc = "$CONDA_PREFIX/Library/bin/nvcc"
[dependencies]
cuda-cudart = "12.8.*"
cuda-nvcc = "12.8.*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
4 participants