Build C++ and CUDA programs with the NVIDIA CUDA development toolkit.
72
Build C++ and CUDA programs with the NVIDIA CUDA development toolkit.
This image uses the NVIDIA CUDA development image for Ubuntu.
It includes nvcc, C++ build tools, CMake, Ninja, ccache, Git, and OpenSSL headers.
You can compile and link CUDA programs without a GPU.
The default working directory is /workspace. The default command is Bash.
| Tag | Contents | Platform |
|---|---|---|
latest | Latest successful build from main | linux/amd64 |
The latest tag changes after a new build passes its tests.
See all tags and digests.
See the Dockerfile
for the CUDA version used by the current build.
Compile main.cu in your current directory:
docker pull stden/cpp-cuda:latest
docker run --rm -v "$PWD":/workspace stden/cpp-cuda:latest nvcc main.cu -o app
To run the program on a GPU, install a compatible NVIDIA driver and the NVIDIA Container Toolkit on the Docker host. Then run:
docker run --rm --gpus all -v "$PWD":/workspace stden/cpp-cuda:latest ./app
Install extra project dependencies in a derived image. Build output stays in the mounted project directory. Files created by the container belong to root. Check the host driver requirements for the CUDA version before you run GPU code.
The smoke test compiles and links a real CUDA kernel. It also runs a host C++ program. It does not run a GPU kernel. Physical GPU operation is not covered by the standard CI runner.
Content type
Image
Digest
sha256:486c26772…
Size
4.3 GB
Last updated
about 4 hours ago
docker pull stden/cpp-cuda