当前位置:   article > 正文

Ubuntu22.04安装Nvidia 550驱动和CUDA toolkit 12.4.1

Ubuntu22.04安装Nvidia 550驱动和CUDA toolkit 12.4.1

1. 安装显卡驱动550版本:

  1. wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
  2. sudo dpkg -i cuda-keyring_1.1-1_all.deb
  3. sudo apt-get update
  4. sudo apt-get -y install cuda-drivers

命令来源于:

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_network

安装完成后重启,重启之后可以输入nvidia-smi命令验证:

  1. xiaxinkai@msi:~$ nvidia-smi
  2. Sat Apr 27 23:51:11 2024
  3. +-----------------------------------------------------------------------------------------+
  4. | NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 |
  5. |-----------------------------------------+------------------------+----------------------+
  6. | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
  7. | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
  8. | | | MIG M. |
  9. |=========================================+========================+======================|
  10. | 0 NVIDIA GeForce RTX 1060 Off | 00000000:01:00.0 On | Off |
  11. | 0% 37C P8 26W / 100W | 494MiB / 1024MiB | 3% Default |
  12. | | | N/A |
  13. +-----------------------------------------+------------------------+----------------------+
  14. +-----------------------------------------------------------------------------------------+
  15. | Processes: |
  16. | GPU GI CI PID Type Process name GPU Memory |
  17. | ID ID Usage |
  18. |=========================================================================================|
  19. | 0 N/A N/A 1698 G /usr/lib/xorg/Xorg 118MiB |
  20. | 0 N/A N/A 1842 G /usr/bin/gnome-shell 138MiB |
  21. | 0 N/A N/A 3223 G ...seed-version=20240426-130149.177000 59MiB |
  22. | 0 N/A N/A 3759 G ...irefox/3836/usr/lib/firefox/firefox 159MiB |
  23. +-----------------------------------------------------------------------------------------+

2. 安装CUDA toolkit 12.4.1:

sudo apt-get -y install cuda-toolkit-12-4

3. 为CUDA12.4在.bashrc中添加环境变量

  1. export PATH=/usr/local/cuda/bin:$PATH
  2. export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

4. 验证CUDA toolkit 12.4.1安装成功

  1. xiaxinkai@msi:~$ nvcc -V
  2. nvcc: NVIDIA (R) Cuda compiler driver
  3. Copyright (c) 2005-2024 NVIDIA Corporation
  4. Built on Thu_Mar_28_02:18:24_PDT_2024
  5. Cuda compilation tools, release 12.4, V12.4.131
  6. Build cuda_12.4.r12.4/compiler.34097967_0

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/522555
推荐阅读
相关标签
  

闽ICP备14008679号