1. Home
  2. Binero.Cloud
  3. Guides
  4. Install NVIDIA Drivers on a GPU instance

Install NVIDIA Drivers on a GPU instance

Content

Linux

The Following steps are tested on Ubuntu 20.04.4 LTS (Focal Fossa)

  1. Verify that the instance can see the NVIDIA card
$ lspci | grep -i nvidia

Example output:

00:05.0 VGA compatible controller: NVIDIA Corporation Device 2236 (rev a1)
  1. The driver needs g++ and make to install. We will also install DKMS to register NVIDIA Kernel Module.
$ sudo apt update
$ sudo apt -y install build-essential dkms 

  1. Download the drivers

The NVIDIA driver on the instance is dependent on the NVIDIA VGPU Manager version.

We are currently running version 470.82 of NVIDIA VGPU Manager, you will have to run version 470.82.01 of the linux driver. You can find compatible NVIDIA driver versions at https://docs.nvidia.com/grid/

$ wget https://storage.googleapis.com/nvidia-drivers-us-public/GRID/GRID13.1/NVIDIA-Linux-x86_64-470.82.01-grid.run
$ chmod +x NVIDIA-Linux-x86_64-470.82.01-grid.run
$ sudo ./NVIDIA-Linux-x86_64-470.82.01-grid.run --dkms --no-cc-version-check --ui=none --no-questions

We can verify that the driver was installed successfully by checking the log file /var/log/nvidia-installer.log

  1. Run nvidia-smi to verify
Fri Mar 4 16:00:20 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.82.01 Driver Version: 470.82.01 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA A10-6Q On | 00000000:00:05.0 Off | 0 |
| N/A N/A P8 N/A / N/A | 576MiB / 5976MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

Please contact us to obtain a license key for your instance. Your performance will be locked to 10% until a valid license is activated.

  1. After you receive the licence-file from our support you can add it to /etc/nvidia/ClientConfigToken/

    e.g. /etc/nvidia/ClientConfigToken/client_configuration_token.tok

Restart nvidia.gridd

$ sudo systemctl restart nvidia-gridd
  1. Verify license status with nvidia-smi -q | grep License
License Status : Licensed (Unrestricted)
  1. Install the CUDA Toolkit
$ wget https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda_11.2.0_460.27.04_linux.run
$ chmod +x cuda_11.2.0_460.27.04_linux.run
$ sudo ./cuda_11.2.0_460.27.04_linux.run --silent --toolkit --override --no-opengl-libs --no-drm
  1. Install CudNN
$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8_8.1.0.77-1+cuda11.2_amd64.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8-dev_8.1.0.77-1+cuda11.2_amd64.deb
$ dpkg -i libcudnn8_8.1.0.77-1+cuda11.2_amd64.deb libcudnn8-dev_8.1.0.77-1+cuda11.2_amd64.deb
  1. Install Tensorflow (optional)
$ sudo apt install python3-zip
$ pip3 install tensorflow==2.6.0

Windows

The NVIDIA driver on the instance is dependent on the NVIDIA VGPU Manager version.

We are currently running version 470.82 of NVIDIA VGPU Manager, you will have to run version 470.82.01 of the linux driver. You can find compatible NVIDIA driver versions at https://docs.nvidia.com/grid/

  1. Download the driver from https://storage.googleapis.com/nvidia-drivers-us-public/GRID/GRID13.1/472.39_grid_win10_win11_server2016_server2019_server2022_64bit_international.exe
  2. Run the file
  1. After the installation is done, restart the instance
  2. Open device manager devmgmt.msc
  3. Verify that windows has detected the graphics card under Display Adapters

Please contact us to obtain a license key for your instance. Your performance will be locked to 10% until a valid license is activated.

  1. Copy the client configuration token to the %SystemDrive%:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken directory. For more information check: https://docs.nvidia.com/grid/latest/grid-licensing-user-guide/#configuring-nls-licensed-client-on-windows
  2. Open services services.msc and restart NvDisplayContainer
Updated on 2022-03-30

Related Articles