Ubuntu 22.04
Sponsored Link

NVIDIA : कंटेनर टूलकिट स्थापित करें2023/09/21

 
कंटेनर्स से अपने कंप्यूटर पर GPU का उपयोग करने के लिए NVIDIA Container Toolkit इंस्टॉल करें।
[1]
[2]
[3] Install NVIDIA Container Toolkit.
root@dlp:~#
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -

OK
root@dlp:~#
curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu22.04/nvidia-docker.list > /etc/apt/sources.list.d/nvidia-docker.list
root@dlp:~#
apt update

root@dlp:~#
apt -y install nvidia-container-toolkit

root@dlp:~#
systemctl restart docker

[4] कंटेनर्स से [nvidia-smi] का उपयोग इस प्रकार करें।
# Cuda 11.5 छवि खींचें और चलाएं [nvidia-smi]

root@dlp:~#
docker run --gpus all nvidia/cuda:11.5.2-base-ubuntu20.04 nvidia-smi

Mon Aug 29 06:02:56 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.85.02    Driver Version: 510.85.02    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:05:00.0 Off |                  N/A |
|  0%   50C    P5     9W / 120W |      0MiB /  6144MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

# Cuda 10.2 छवि खींचें और इंटरैक्टिव सत्र से कनेक्ट करें, फिर [nvidia-smi] चलाएं

root@dlp:~#
docker run -it --gpus all nvidia/cuda:10.2-base-ubuntu18.04 bash

root@08ae46c44932:/#
nvidia-smi

Mon Aug 29 06:04:46 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.85.02    Driver Version: 510.85.02    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:05:00.0 Off |                  N/A |
|  0%   50C    P5    10W / 120W |      0MiB /  6144MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

root@08ae46c44932:/# exit 

root@dlp:~#
docker images

REPOSITORY    TAG                       IMAGE ID       CREATED        SIZE
nvidia/cuda   10.2-base-ubuntu18.04     9ba99482dca2   2 weeks ago    107MB
ubuntu        latest                    df5de72bdb3b   3 weeks ago    77.8MB
nvidia/cuda   11.5.2-base-ubuntu20.04   20e5014a14c9   3 months ago   153MB
मिलान सामग्री