NVIDIA驱动失效简单解决方案:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver.
第一步,打开终端,先用nvidia-smi查看一下,发现如下报错:
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Make sure that the latest NVIDIA driver is installed and running.
第二步,使用nvcc -V检查驱动和cuda。
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
发现驱动是存在的,于是进行下一步
第三步,查看已安装驱动的版本信息
ls /usr/src | grep nvidia
比如我的驱动版本是:nvidia-450.57
第四步,依次输入以下命令
sudo apt-get install dkms
# 把驱动注册进入内核
sudo dkms install -m nvidia -v 450.57
等待安装完成后,再次输入nvidia-smi,查看GPU使用状态:
root@AI-03:/home/work/cluster# ls /usr/src | grep nvidia
nvidia-495.29.05
root@AI-