Our cuda
machine image comes preinstalled with a number of useful tools for testing and deploying jobs that require the use of a dedicated GPU.
This image contains the minimum tools required to operate a build on CircleCI, such as git
, docker
, cuda
, and nvidia-gds
to support GPU enabled workflows.
This image can be used with the CircleCI gpu
executor
For example:
1
2
3
4
5
6
7
8
jobs:
build:
machine:
image: linux-cuda-11:default
resource_class: gpu.nvidia.medium
steps:
- checkout
- run: nvidia-smi
In the above example, the CircleCI CUDA image is used as the virtual machine image. The medium GPU resource class is used, and the tag default
refers to the latest stable release of this image.
Please visit our resource classes docs on GPU for additional options.
This image is built off the latest quarterly Ubuntu image at the time of release, and includes many resources needed to run most builds on CircleCI.
This includes but is not limited to:
build-essential
package containing compiling toolsThe default version will be the latest CUDA version, but you can switch between included versions by running the following command, replacing <<version>>
with the major.minor CUDA release:
# sudo update-alternatives --set cuda /usr/local/cuda-<<version>>
sudo update-alternatives --set cuda /usr/local/cuda-11.6
The recommended approach is to use the default
tag to ensure the latest CUDA versions are available. Generally, we support and include the last three versions of the latest major CUDA release.
Please refer to our CUDA image policy for additional details.