Sign inSign up
cpp-cuda logo

stden/cpp-cuda

By stden

•Updated 1 day ago

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

Image
Languages & frameworks
Developer tools
0

962

stden/cpp-cuda repository overview

⁠stden/cpp-cuda

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

⁠What you learn

You learn to use cpp-cuda in a Docker container.

⁠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 image has no Nsight Compute profiler. The course does not use it. The default working directory is /workspace. The default command is Bash.

⁠Tags

TagMeaningPlatform
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 of 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 this command:

docker run --rm --gpus all -v "$PWD":/workspace stden/cpp-cuda:latest ./app

Install extra project dependencies in a child image. Build output stays in the mounted project directory. Files that the container creates belong to root. Before you run GPU code, check that the host driver supports the CUDA version.

⁠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. The standard CI runner does not test physical GPU operation.

⁠Source

Tag summary

Content type

Image

Digest

sha256:08aa794fe…

Size

4.7 GB

Last updated

1 day ago

docker pull stden/cpp-cuda