下载显卡当前版本对应的nvidia-modprobe
https://developer.download.nvidia.cn/compute/cuda/repos/
wget https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2204/x86_64/nvidia-modprobe_520.61.05-0ubuntu1_amd64.deb &&
sudo dpkg -i nvidia-modprobe_520.61.05-0ubuntu1_amd64.deb
reboot重启
手动创建缺失的设备文件
mknod -m 666 /dev/nvidia-modeset c 195 254
mknod -m 666 /dev/nvidia-uvm c 506 0
mknod -m 666 /dev/nvidia-uvm-tools c 506 1
重装nvidia-modprobe、nvidia-container-runtime、nvidia-docker2依赖
apt install -y nvidia-modprobe nvidia-container-runtime nvidia-docker2
nvidia-persistenced && nvidia-modprobe -u -c=0
查看状态正常
ls -al /dev/nvi*
root@localserver:~# ls -al /dev/nvi*
crw-rw-rw- 1 root root 195, 0 Oct 25 11:59 /dev/nvidia0
crw-rw-rw- 1 root root 195, 255 Oct 25 11:59 /dev/nvidiactl
crw-rw-rw- 1 root root 195, 254 Oct 25 11:59 /dev/nvidia-modeset
crw-rw-rw- 1 root root 506, 0 Oct 25 12:01 /dev/nvidia-uvm
crw-rw-rw- 1 root root 506, 1 Oct 25 12:01 /dev/nvidia-uvm-tools
/dev/nvidia-caps:
total 0
drwxr-xr-x 2 root root 80 Oct 25 11:59 .
drwxr-xr-x 21 root root 4360 Oct 25 12:01 ..
cr-------- 1 root root 509, 1 Oct 25 11:59 nvidia-cap1
cr--r--r-- 1 root root 509, 2 Oct 25 11:59 nvidia-cap2