Install the CUDA driver

Follow the instructions from https://cloud.google.com/compute/docs/gpus/install-drivers-gpu to get the NVIDIA CUDA drivers installed:

  1. Retrieve the CUDA repository:
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
  1. Install the .deb package:
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
  1. Add the NVIDIA GPG key to the apt sources keyring:
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
  1. Install the NVIDIA CUDA drivers:
sudo apt-get update && sudo apt-get install cuda
  1. We now have a CUDA-enabled GPU on our GCP VM. We can validate this with the nvidia-smi command:
nvidia-smi
  1. We will see the following output in the screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.23.147