本文作者丁辉
Linux下载并安装GPU驱动
GPU驱动下载
查看显卡型号
1
2
3lspci | grep -i nvidia
# 或
lspci | grep -i vga结果
1
2[root@offends ~]# lspci | grep -i nvidia
00:08.0 3D controller: NVIDIA Corporation TU104GL [Tesla T4] (rev a1)根据自己的显卡型号去下载驱动
- Product Type:Tesla
- Product Series:T
- Product:T4
- Operating System:Linux 64-bit
- CUDA Toolkit:Any
- Language:Chinese (Traditional)
1
wget https://cn.download.nvidia.com/tesla/440.95.01/NVIDIA-Linux-x86_64-440.95.01.run
部署
1
bash NVIDIA-Linux-x86_64-*.run
测试效果
1
nvidia-smi
结果
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21[root@offends ~]#
Mon Oct 2 16:22:37 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.106.00 Driver Version: 460.106.00 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| 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 Tesla T4 On | 00000000:00:08.0 Off | 0 |
| N/A 30C P8 9W / 70W | 0MiB / 15109MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
Linux 卸载 NVIDIA 驱动
有部署文件情况下
1
bash NVIDIA-Linux-x86_64-*.run --uninstall
没有原部署文件的情况下
1
/usr/bin/nvidia-uninstall
问题记录
经过多次卸载安重新装遇到报错
1
2
3
4ERROR: An NVIDIA kernel module 'nvidia' appears to already be loaded in your kernel. This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence Daemon), but this may also happen
if your kernel was configured without support for module unloading. Please be sure to exit any programs that may be using the GPU(s) before attempting to upgrade your driver. If no GPU-based programs are running, you
know that your kernel supports module unloading, and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to reboot
your computer.解决方法直接
reboot
重启服务器解决成功率 99% 哈哈
I'm so cute. Please give me money.
- 本文链接: https://blog.offends.cn/Linux/Docs/Linux下载并安装GPU驱动.html
- 版权声明: 本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。