AWS EC2 instance losing GPU support after reboot

There seems to be a problem with building older NVIDIA drivers on 4.4.0-107x-aws kernels. You can install newer NVIDIA drivers, which should work fine with the current kernel:

wget http://us.download.nvidia.com/tesla/410.104/NVIDIA-Linux-x86_64-410.104.run
sudo sh ./NVIDIA-Linux-x86_64-410.104.run --no-drm --disable-nouveau --dkms --silent --install-libglvnd 

According to an AWS representative, the drivers were updated in the Deep Learning AMI on 21/03/2019 [AWS forums].


I experienced the same issue and it helped me to do

sudo apt-get install nvidia-cuda-toolkit
sudo reboot

Good luck!