1. Error
nvidia-smi input error:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
input torch.cuda.is_available() return false
2. Solution
Simply execute two commands.
sudo apt-get install dkms
sudo dkms install -m nvidia -v 470.94 (470.94 is the driver version number)
Use the command ll /usr/src/ to see a nvidia-470.94/ folder underneath, the version number varies from your computer