ZhangZhihui's Blog  

CUDA, which stands for Compute Unified Device Architecture, is a parallel computing platform and application programming interface (API) model created by NVIDIA. 

 

(base) zzh@ZZHPC:~$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:1b.4/0000:02:00.0 ==
modalias : pci:v000010DEd00001F07sv000010DEsd000012ADbc03sc00i00
vendor   : NVIDIA Corporation
model    : TU106 [GeForce RTX 2070 Rev. A]
driver   : nvidia-driver-545-open - distro non-free
driver   : nvidia-driver-535 - distro non-free
driver   : nvidia-driver-550 - distro non-free recommended
driver   : nvidia-driver-470 - distro non-free
driver   : nvidia-driver-535-server-open - distro non-free
driver   : nvidia-driver-545 - distro non-free
driver   : nvidia-driver-550-open - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-535-open - distro non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

 

zzh@ZZHPC:~$ sudo apt install nvidia-driver-550

 

zzh@ZZHPC:~$ nvidia-smi
Fri Sep 27 14:55:10 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.107.02             Driver Version: 550.107.02     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. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 2070        Off |   00000000:02:00.0 Off |                  N/A |
| 41%   33C    P8              2W /  185W |       6MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2361      G   /usr/lib/xorg/Xorg                              4MiB |
+-----------------------------------------------------------------------------------------+

 

https://developer.nvidia.com/cuda-12-4-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local

 

Base Installer	
Installation Instructions:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda-repo-ubuntu2204-12-4-local_12.4.0-550.54.14-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-4-local_12.4.0-550.54.14-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-12-4-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-4

 

Driver Installer	
NVIDIA Driver Instructions (choose one option)
To install the legacy kernel module flavor:
sudo apt-get install -y cuda-drivers
To install the open kernel module flavor:
sudo apt-get install -y nvidia-driver-550-open
sudo apt-get install -y cuda-drivers-550

 

zzh@ZZHPC:~/Downloads/cuda$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
......
Saving to: ‘cuda-ubuntu2204.pin’

zzh@ZZHPC:~/Downloads/cuda$ wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda-repo-ubuntu2204-12-4-local_12.4.0-550.54.14-1_amd64.deb
......
Length: 3447943098 (3.2G) [application/x-deb]
Saving to: ‘cuda-repo-ubuntu2204-12-4-local_12.4.0-550.54.14-1_amd64.deb’

cuda-repo-ubuntu2204-12-4-local_12.4.0-55 100%[==================================================================================>]   3.21G  2.61MB/s    in 23m 41s

 

zzh@ZZHPC:~/Downloads/cuda$ sudo dpkg -i cuda-repo-ubuntu2204-12-4-local_12.4.0-550.54.14-1_amd64.deb
......

The public cuda-repo-ubuntu2204-12-4-local GPG key does not appear to be installed.
To install the key, run this command:
sudo cp /var/cuda-repo-ubuntu2204-12-4-local/cuda-87AE4CD8-keyring.gpg /usr/share/keyrings/

zzh@ZZHPC:~/Downloads/cuda$ sudo cp /var/cuda-repo-ubuntu2204-12-4-local/cuda-87AE4CD8-keyring.gpg /usr/share/keyrings/

 

zzh@ZZHPC:~/Downloads/cuda$ sudo apt-get update

zzh@ZZHPC:~/Downloads/cuda$ sudo apt-get -y install cuda-toolkit-12-4

 

posted on 2024-09-27 14:17  ZhangZhihuiAAA  阅读(17)  评论(0编辑  收藏  举报