banner
NEWS LETTER

Linux下载并安装GPU驱动

Scroll down

本文作者丁辉

Linux下载并安装GPU驱动

NVIDIA中文官方驱动下载页面

GPU驱动下载

  1. 查看显卡型号

    1
    2
    3
    lspci | 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)
  2. 根据自己的显卡型号去下载驱动

    • 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
  3. 部署

    1
    bash NVIDIA-Linux-x86_64-*.run
  4. 测试效果

    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
    4
    ERROR: 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.

其他文章
cover
Iptables限制
  • 70/01/01
  • 00:00
  • Linux-Docs
目录导航 置顶
  1. 1. Linux下载并安装GPU驱动
    1. 1.1. GPU驱动下载
    2. 1.2. Linux 卸载 NVIDIA 驱动
    3. 1.3. 问题记录
请输入关键词进行搜索