Nvidia 驱动

Nvidia 驱动 #

显卡类型 说明
GeForce RTX 游戏卡
TITAN 游戏发烧卡, 深度学习屌丝卡
NVIDIA RTX / Quadro 图形卡
Data Center / Tesla 计算卡
GRID 物理卡:只有 GRID K1/K2 两个型号,早停产。 虚拟卡:Quadro 系列或者是 Tesla 系列分出来的多张虚拟显卡
Networking
NVS
ION


apt install -y ubuntu-drivers-common

# 查询推荐的 nvidia 驱动
ubuntu-drivers devices

# 按推荐安装驱动
apt install -y nvidia-driver-535

# CUDA Toolkit: 12.2
# Driver Version: 535.54.03
# Release Date: 2023.6.26
curl -LO https://us.download.nvidia.com/tesla/535.54.03/NVIDIA-Linux-x86_64-535.54.03.run
bash NVIDIA-Linux-x86_64-535.54.03.run

# CUDA Toolkit: 12.0
# Driver Version: 525.60.13
# Release Date: 2022.12.5
curl -LO https://us.download.nvidia.com/tesla/525.60.13/NVIDIA-Linux-x86_64-525.60.13.run
bash NVIDIA-Linux-x86_64-525.60.13.run

# CUDA Toolkit: 11.7
# Driver Version: 515.86.01
# Release Date: 2022.11.22
curl -LO https://us.download.nvidia.com/tesla/515.86.01/NVIDIA-Linux-x86_64-515.86.01.run
bash NVIDIA-Linux-x86_64-515.86.01.run

# CUDA Toolkit: 11.6
# Driver Version: 510.108.03
# Release Date: 2022.11.22
curl -LO https://us.download.nvidia.com/tesla/510.108.03/NVIDIA-Linux-x86_64-510.108.03.run
bash NVIDIA-Linux-x86_64-510.108.03.run

# CUDA Toolkit: 11.4
# Driver Version: 470.161.03
# Release Date: 2022.11.22
curl -LO https://us.download.nvidia.com/tesla/470.161.03/NVIDIA-Linux-x86_64-470.161.03.run
bash NVIDIA-Linux-x86_64-470.161.03.run

# CUDA Toolkit: 11.2
# Driver Version: 460.106.00
# Release Date: 2021.10.26
curl -LO https://us.download.nvidia.com/tesla/460.106.00/NVIDIA-Linux-x86_64-460.106.00.run
bash NVIDIA-Linux-x86_64-460.106.00.run

# CUDA Toolkit: 11.0
# Driver Version: 450.216.04
# Release Date: 2022.11.22
curl -LO https://us.download.nvidia.com/tesla/450.216.04/NVIDIA-Linux-x86_64-450.216.04.run
bash NVIDIA-Linux-x86_64-450.216.04.run

# CUDA Toolkit: 10.2
# Driver Version: 440.118.02
# Release Date: 2020.9.30
curl -LO https://us.download.nvidia.com/tesla/440.118.02/NVIDIA-Linux-x86_64-440.118.02.run
bash NVIDIA-Linux-x86_64-440.118.02.run

# CUDA Toolkit: 10.1
# Driver Version: 418.226.00
# Release Date: 2021.10.26
curl -LO https://us.download.nvidia.com/tesla/418.226.00/NVIDIA-Linux-x86_64-418.226.00.run
bash NVIDIA-Linux-x86_64-418.226.00.run

# CUDA Toolkit: 10.0
# Driver Version: 410.129
# Release Date: 2019.9.4
curl -LO https://us.download.nvidia.com/tesla/410.129/NVIDIA-Linux-x86_64-410.129.run
bash NVIDIA-Linux-x86_64-410.129.run

卸载 nvidia driver #

# 方法一
dpkg -l | grep -i nvidia
sudo apt-get remove --purge '^nvidia-.*'

# If the ubuntu-desktop package is removed, reinstall it with the following command:
# sudo apt-get install ubuntu-desktop

# 方法二
sh NVIDIA-Linux-x86_64-535.54.03.run --uninstall

nvidia-smi #

nvidia-smi 右上角显示的 CUDA Version: 是指支持的最高版本的 cuda

SMI: System Management Interface

# 查询全部信息
nvidia-smi -q
# 查询 gpu 架构
nvidia-smi -q | grep Product

# 拓扑信息
nvidia-smi topo -m

# GPU 利用率统计
nvidia-smi --format=csv,noheader,nounits --query-gpu=timestamp,index,memory.total,memory.used,memory.free,utilization.gpu,utilization.memory -lms 500 -f  gup.log

# 筛选 gpu2
awk  -F","  '{ if($2==2){print $0} } '  smi-1-90s-instance.log > gpu2.log

# 计算 gpu 平均利用率
cat gpu2.log| awk '{sum7+=$7;count++} END {print sum7/count}'

# 动态观察 GPU 的状态(原地刷新)
watch -n 0.5 nvidia-smi

# 5 秒刷新一次
nvidia-smi -l 5


本文访问量

本站总访问量

本站总访客数