用 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.
网上搜了一下,用下面的方法顺利解决了问题 ,参考:https://blog.csdn.net/hangzuxi8764/article/details/86572093
# ls /usr/src | grep nvidia
nvidia-535.54.03
# sudo apt install dkms
# sudo dkms install -m nvidia -v 535.54.03
其中,535.54.03 是之前安装 nvidia 驱动的版本号,可通过下面方法查到:
ls /usr/src | grep nvidia