# Nvidia_Tesla_P4_P40_Manual_For_Debian_12
适用于 Linux Debian 12 安装Tesla P4 P40等GPU的显卡Cuda和驱动
Suitable for Linux Debian 12 to install graphics card Cuda and driver for Tesla P4 P40 and other GPUs
在pve 8.2中使用q35(不可使用i440fx)机型创建的虚拟机中安装Nvidia gpu驱动的教程。
Tutorial for installing Nvidia gpu drivers in a virtual machine created with the q35 (not available with i440fx) model in pve 8.2.


## 检查显卡存在
通常可以使用 lspci 命令来识别已安装显卡的 NVIDIA 图形处理单元 (GPU) 系列/代号。例如:
You can usually use the lspci command to identify the NVIDIA graphics processing unit (GPU) family/codename of an installed graphics card. For example:
```bash
$ lspci | grep NVIDIA
```
## 为apt允许非自由软件源
Allow non-free software sources for apt
```bash
for non-Chinese users:
vim.tiny /etc/apt/sources.list
Add "contrib", "non-free" and "non-free-firmware" components to /etc/apt/sources.list, for example:
# Debian Bookworm
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
```
```bash
# 对于中国用户更换清华tuna源:
vim.tiny /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
```
### 更新apt
### Update apt
```bash
apt update -y
```
## 安装显卡驱动
```bash
apt install nvidia-driver firmware-misc-nonfree
```
重启电脑
### 检查 Debian 12 上是否安装了显卡驱动
```bash
nvidia-smi
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI |
|-----------------------------------------+----------------------+----------------------+
| 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 P4 On | 00000000:03:00.0 Off | Off |
| N/A 38C P8 6W / 75W | 0MiB / 8192MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
```
显卡驱动已安装完毕
## 安装Cuda
install Cuda
```bash
apt install nvidia-cuda-dev nvidia-cuda-toolkit
```
### 检查 Debian 12 上是否安装了 NVIDIA CUDA
```bash
nvcc --version
```
## 安装 NVIDIA cuDNN
install cuDNN
```bash
apt install nvidia-cudnn
```
看到窗口后,按 <Enter> 键同意。
Once you see the window, press <Enter> to agree the license.
NVIDIA cuDNN 库需要从 NVIDIA 官方网站下载。需要一段时间。
NVIDIA cuDNN libraries are being downloaded from the official website of NVIDIA. It takes a while to complete.
## 关闭ECC
Turn off ECC
通过```nvidia-smi | grep Tesla```查看前面GPU编号
```bash
d@d:/fuck$ nvidia-smi | grep Tesla
| 0 Tesla P40 On | 00000000:03:00.0 Off | Off |
-----------------------------------------------------------------------------------------
nvidia-smi -i n -e 0/1 可关闭(0)/开启(1) , n是GPU的编号。
```
执行关闭ECC```sudo nvidia-smi -i 0 -e 0```重启后该设置生效。

好家伙VCC
- 粉丝: 2827
- 资源: 9136
最新资源
- 基于Arduino设计的直流电压表毕业项目,原理图、源码-电路方案
- 基于深度学习和单目摄像头测距的前车碰撞预警系统源码详解(附设计文档),基于深度学习和单目摄像头测距的前车碰撞预警系统源码详解(GPU与CPU版本),前车碰撞预警-FCW,基于深度学习和单目摄像头测距
- RedPanda.C .3.2.win64.MinGW64-11.4.zip
- unixbench自动化脚本
- 毕业设计基于Python的Django-html基于知识图谱电影推荐问答系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 青海统计年鉴2000-2020年
- 价值19800的影视视频微信小程序源码-自带支付通道带采集+搭建教程
- mingw-w64-x86-64-gmp-6.3.0-2-any.pkg.zip
- lua基础编程,包括lua的基本类型,语法,table,面向对象,协程,和c api
- 扫地机器人路径规划中遗传算法的应用与MATLAB实现-遗传算法-路径规划-扫地机器人-优化搜索-matlab
- 软考初级程序员 C程序设计(一)ppt
- spec2017工具cfg配置文件
- ltp20240524工具
- 西门子PLC STEP7编程软件梯形图与昆仑通态触摸屏电锅炉峰谷电供热系统全方案,CAD原理图全套包装解析,西门子PLC与昆仑通态触摸屏联控电锅炉供热系统:峰电供热与谷电蓄热水箱全自动蓄能程序CAD原
- HFI脉振方波高频注入与增强滑膜esmo代码:含原厂文档,TI与ST移植方式,学习资料大放送,HFI脉振方波高频注入与增强滑膜esmo代码:含原厂文档,可移植使用,支持TI与ST方式,HFI脉振方波高
- 2025年2月28日PPTX
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


