Sign inSign up

stden/cpp-cuda

By stden

•Updated about 4 hours ago

Build C++ and CUDA programs with the NVIDIA CUDA development toolkit.

Image
Languages & frameworks
Developer tools
0

72

stden/cpp-cuda repository overview

⁠stden/cpp-cuda

Build C++ and CUDA programs with the NVIDIA CUDA development toolkit.

⁠Overview

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.

⁠Tags

TagContentsPlatform
latestLatest successful build from mainlinux/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.

⁠Use

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.

⁠Checks

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.

⁠Source

Tag summary

Content type

Image

Digest

sha256:486c26772…

Size

4.3 GB

Last updated

about 4 hours ago

docker pull stden/cpp-cuda