After you create an instance with one or more GPUs, your system requires device drivers so that your applications can access the device.
To ensure a successful installation, your operating system must have the latest package updates.
Connect to the instance where you want to install the driver.
Select a driver repository for the CUDA Toolkit and add it to your instance.
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
Update the package lists.
sudo apt-get update
Install CUDA, which includes the NVIDIA driver.
sudo apt-get install cuda