Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cuda.md, replace cuda 12.2 by 12.5 #1238

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions content/cuda.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The `nvidia-cuda-toolkit` package is [maintained by Ubuntu](https://packages.ubu

The `nvidia-container-toolkit` package uses Docker containers to allow alternate versions of the CUDA libraries to be installed alongside the one included with the NVIDIA driver. You can see the different Docker images that are published by NVIDIA here: <https://hub.docker.com/r/nvidia/cuda/>

This example installs a development enviroment with CUDA version 12.1.
This example installs a development enviroment with CUDA version 12.4.

#### Install Software

Expand Down Expand Up @@ -70,15 +70,15 @@ sudo systemctl restart docker
Run this command to check the Docker configuration for CUDA:

```bash
docker run --rm --runtime=nvidia --gpus all nvidia/cuda:12.1.0-devel-ubuntu22.04 nvidia-smi
docker run --rm --runtime=nvidia --gpus all nvidia/cuda:12.4.0-devel-ubuntu22.04 nvidia-smi
```

The output displays the CUDA version supported by the container:

```
Thu Mar 23 14:43:51 2023
Thu Jun 13 14:43:51 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02 Driver Version: 525.89.02 CUDA Version: 12.1 |
| NVIDIA-SMI 550.67. Driver Version: 550.67 CUDA Version: 12.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
Expand All @@ -102,26 +102,26 @@ Thu Mar 23 14:43:51 2023
Start a shell within the container:

```bash
docker run -it --rm --runtime=nvidia --gpus all nvidia/cuda:12.1.0-devel-ubuntu22.04 bash
docker run -it --rm --runtime=nvidia --gpus all nvidia/cuda:12.4.0-devel-ubuntu22.04 bash
```

Commands can then be run with CUDA support:

```shell
root@5397e7ea7f57:/# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Feb__7_19:32:13_PST_2023
Cuda compilation tools, release 12.1, V12.1.66
Build cuda_12.1.r12.1/compiler.32415258_0
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0
```

The container can be viewed and managed using `docker ps` in another terminal or tab:

```bash
system76@pop-os:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5397e7ea7f57 nvidia/cuda:12.1.0-devel-ubuntu22.04 "/opt/nvidia/nvidia_…" 2 minutes ago Up 2 minutes boring_tesla
5397e7ea7f57 nvidia/cuda:12.4.0-devel-ubuntu22.04 "/opt/nvidia/nvidia_…" 2 minutes ago Up 2 minutes boring_tesla
```

The container ID can be referenced to copy files into and out of the container:
Expand All @@ -143,10 +143,10 @@ The binary (`c++11_cuda`) is built:
```
root@5397e7ea7f57:~/cuda-samples/Samples/0_Introduction/c++11_cuda# ls -l
total 6108
-rw-rw-r-- 1 1000 1000 13679 Mar 24 16:45 Makefile
-rw-rw-r-- 1 1000 1000 13951 Mar 24 16:45 Makefile
-rw-rw-r-- 1 1000 1000 2090 Mar 24 16:45 NsightEclipse.xml
-rw-rw-r-- 1 1000 1000 3556 Mar 24 16:45 README.md
-rwxr-xr-x 1 root root 1881448 Mar 24 16:48 c++11_cuda
-rwxr-xr-x 1 root root 2147784 Mar 24 16:48 c++11_cuda
...
```

Expand Down
Loading