Torch.cuda.is_available() returns False

Thanks for the link that you provided.

Initially, I tried the following set of commands to reinstall nvidia drivers.

  1. Download the driver - curl -O http://us.download.nvidia.com/tesla/384.125/nvidia-diag-driver-local-repo-ubuntu1604-384.125_1.0-1_amd64.deb
  2. sudo apt-get purge nvidia* - To remove current installations
  3. sudo dpkg -i nvidia-diag-driver-local-repo-ubuntu1604-384.125_1.0-1_amd64.debearlier
  4. sudo apt-get update
  5. sudo apt-get install cuda-drivers

However, after rebooting the instance same problem still exist.

Then I followed the instruction provided in the link http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux that you provided. However, after following those steps and rebooting the instance the lsmod | grep nvidia command is giving me no output. As per the post, it suggests installation has failed. As usual nvidia-smi is not working as expected.