This action installs the NVIDIA® CUDA® Toolkit on the system. It adds the cuda install location as CUDA_PATH
to GITHUB_ENV
so you can access the CUDA install location in subsequent steps. CUDA_PATH/bin
is added to GITHUB_PATH
so you can use commands such as nvcc
directly in subsequent steps. Right now both windows-2019
and ubuntu-20.04
runners have been tested to work successfully.
Optional The CUDA version to install. View src/link/windows-links.ts
and src/link/linux-links.ts
for available versions.
Default: '12.1.1'
.
NOTE: On Linux this only works with the 'network' method view details
Optional
If set, only the specified CUDA subpackages will be installed.
Only installs specified subpackages, must be in the form of a JSON array. For example, if you only want to install nvcc and visual studio integration: '["nvcc", "visual_studio_integration"]'
(double quotes required)
Default: '[]'
.
NOTE: This only works on Linux with the 'network' method view details
Optional
If set, only the specified CUDA subpackages will be installed without prepending the "cuda-" prefix.
Only installs specified subpackages without prepending the "cuda-" prefix, must be in the form of a JSON array. For example, if you only want to install libcublas and libcufft: '["libcublas", "libcufft"]'
(double quotes required)
Default: '[]'
.
Optional
Installation method, can be either 'local'
or 'network'
.
'local'
downloads the entire installer with all packages and runs that (you can still only install certain packages withsub-packages
on Windows).'network'
downloads a smaller executable which only downloads necessary packages which you can define insub-packages
.
Default: 'local'
.
Optional
(For Linux and 'local' method only) override arguments for the Linux .run
installer. For example if you don't want samples use '["--toolkit"]'
(double quotes required)
See the Nvidia Docs for available options. Note that the --silent
option is already always added by the action itself.
Default: '["--toolkit", "--samples"]'
.
The cuda version installed (same as cuda
from input).
The path where cuda is installed (same as CUDA_PATH
in GITHUB_ENV
).
steps:
- uses: Jimver/cuda-toolkit@v0.2.11
id: cuda-toolkit
with:
cuda: '12.1.0'
- run: echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}"
- run: echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
- run: nvcc -V