当前位置:   article > 正文

GPU cuda驱动安装_cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_

cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm: header v4 rsa/sha5

cuda驱动官方下载地址(根据操作系统下载安装):https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=CentOS&target_version=7&target_type=rpmlocal

  1. 下载安装cuda仓库环境
  2. wget http://developer.download.nvidia.com/compute/cuda/11.0.1/local_installers/cuda-repo-rhel7-11-0-local-11.0.1_450.36.06-1.x86_64.rpm
  3. sudo rpm -i cuda-repo-rhel7-11-0-local-11.0.1_450.36.06-1.x86_64.rpm
  4. sudo yum clean all

 1、安装dkms

  1. wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/epel/7.2020-04-20/ppc64/Packages/d/dkms-2.6.1-1.el7.noarch.rpm
  2. yum install dkms-2.6.1-1.el7.noarch.rpm

2、安装cuda

  1. sudo yum -y install nvidia-driver-latest-dkms cuda
  2. sudo yum -y install cuda-drivers

3、配置环境变量

  1. [root@localhost ~]# vim /etc/profile
  2. export CUDA_HOME="/usr/local/cuda-11.0"
  3. export PATH=$CUDA_HOME/bin:$PATH
  4. export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH

4、启动驱动

450.36.06是NVIDIA的版本号,当你不知道的时候,进入/usr/src目录中,可以看到里面有nvidia文件夹,后缀就是其版本号

dkms install -m nvidia -v 450.36.06

5、检查驱动安装是否正常

如果报错(NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running),检查是否有gpu,系统日志/var/log/messages的报错

  1. [root@localhost ~]# nvidia-smi
  2. Fri Jul 3 15:27:16 2020
  3. +-----------------------------------------------------------------------------+
  4. | NVIDIA-SMI 450.36.06 Driver Version: 450.36.06 CUDA Version: 11.0 |
  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 Tesla P40 Off | 00000000:04:00.0 Off | Off |
  11. | N/A 20C P8 9W / 250W | 0MiB / 24451MiB | 0% Default |
  12. | | | N/A |
  13. +-------------------------------+----------------------+----------------------+
  14. | 1 Tesla P40 Off | 00000000:06:00.0 Off | Off |
  15. | N/A 25C P8 9W / 250W | 0MiB / 24451MiB | 0% Default |
  16. | | | N/A |
  17. +-------------------------------+----------------------+----------------------+
  18. | 2 Tesla P40 Off | 00000000:07:00.0 Off | Off |
  19. | N/A 20C P8 9W / 250W | 0MiB / 24451MiB | 0% Default |
  20. | | | N/A |
  21. +-------------------------------+----------------------+----------------------+
  22. | 3 Tesla P40 Off | 00000000:0D:00.0 Off | Off |
  23. | N/A 18C P8 8W / 250W | 0MiB / 24451MiB | 0% Default |
  24. | | | N/A |
  25. +-------------------------------+----------------------+----------------------+
  26. | 4 Tesla P40 Off | 00000000:0E:00.0 Off | Off |
  27. | N/A 20C P8 9W / 250W | 0MiB / 24451MiB | 0% Default |
  28. | | | N/A |
  29. +-------------------------------+----------------------+----------------------+
  30. | 5 Tesla P40 Off | 00000000:0F:00.0 Off | Off |
  31. | N/A 20C P8 8W / 250W | 0MiB / 24451MiB | 0% Default |
  32. | | | N/A |
  33. +-------------------------------+----------------------+----------------------+
  34. +-----------------------------------------------------------------------------+
  35. | Processes: |
  36. | GPU GI CI PID Type Process name GPU Memory |
  37. | ID ID Usage |
  38. |=============================================================================|
  39. | No running processes found |
  40. +-----------------------------------------------------------------------------+

相关连接:https://blog.csdn.net/hangzuxi8764/article/details/86572093

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

闽ICP备14008679号