Skip to main content
Install drivers on the cloud server with the GPU
Last update:

Install drivers on the cloud server with the GPU

For stable operation of NVIDIA® GPUs on a cloud server with a GPU drivers must be installed. Drivers are pre-installed in servers created from a ready-made image Ubuntu 22.04 LTS Machine Learning 64-bit.

  1. Select the driver version.
  2. Install the driver.

Select the driver version

  1. Connect to a cloud server with a GPU.

  2. Install the ubuntu-drivers-common package:

    sudo apt install -y ubuntu-drivers-common alsa-utils
  3. Check out the recommended driver version:

    sudo ubuntu-drivers devices

    A list of versions will appear in the response. Example for NVIDIA® Tesla T4 GPU with recommended version 550:

    == /sys/devices/pci0000:00/0000:00:06.0 ==
    modalias : pci:v000010DEd00001EB8sv000010DEsd000012A2bc03sc02i00
    vendor : NVIDIA Corporation
    model : TU104GL [Tesla T4]
    manual_install: True
    driver : nvidia-driver-450-server - distro non-free
    driver : nvidia-driver-535-server - distro non-free
    driver : nvidia-driver-470-server - distro non-free
    driver : nvidia-driver-470 - distro non-free
    driver : nvidia-driver-550 - third-party non-free recommended
    driver : nvidia-driver-418-server - distro non-free
    driver : xserver-xorg-video-nouveau - distro free builtin
  4. Optional: see a list of all available versions:

    sudo apt-cache search nvidia-driver-*

    Make sure that the selected driver version is higher than the minimum compatible version for the cloud server GPU architecture. To view the GPU architecture, see the instructions Create a cloud server with GPU and the driver version and architecture correspondence is in the manual CUDA Compatibility NVIDIA® documentation.

Install the driver

  1. If your GPU architecture is Pascal (such as the NVIDIA® GTX 1080), add the NVIDIA® Personal Package Archive repository to the cloud server:

    sudo add-apt-repository ppa:graphics-drivers/ppa -y
  2. Install linux-headers (kernel headers):

    sudo apt update
    for kernel in $(linux-version list); do apt install -y "linux-headers-${kernel}"; done
  3. Install the driver:

    sudo apt install -y nvidia-driver-<driver_version>

    Specify <driver_version> — the driver version you chosen.

    Example of installing the recommended version 550 for NVIDIA® Tesla T4 GPUs:

    sudo apt install -y nvidia-driver-550
  4. Check that the driver is installed and working:

    nvidia-smi

    NVIDIA-SMI version, driver, and CUDA will appear in the response. For example:

    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.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 Tesla T4 Off | 00000000:00:06.0 Off | 0 |
    | N/A 41C P8 10W / 70W | 0MiB / 15360MiB | 0% Default |
    | | | N/A |
    +-----------------------------------------+------------------------+----------------------+

    +-----------------------------------------------------------------------------------------+
    | Processes: |
    | GPU GI CI PID Type Process name GPU Memory |
    | ID ID Usage |
    |=========================================================================================|
    | No running processes found |
    +-----------------------------------------------------------------------------------------+
  5. Open the configuration file of the unattended-upgrades package that handles security updates:

    nano /etc/apt/apt.conf.d/50unattended-upgrades
  6. Disable package updates for NVIDIA®. To do this, add a block to the file:

    Unattended-Upgrade::Package-Blacklist {
    "linux-";
    "nvidia-";
    };