VK Cloud logo

Installing the Linux GPU driver

  1. Check your VM's configuration type:

    1. Go to your VK Cloud management console.
    2. Go to Cloud Computing → Virtual Machines.
    3. In the list, find the VM for which you need to install the GPU driver. Make sure the Type column shows a dedicated GPU configuration flavor.
  2. Connect to the VM with the GPU, or create a new one if you haven't done so already.

  3. Check whether the GPU driver is installed:

    /usr/bin/nvidia-smi --query-gpu=driver_version --format=csv,noheader| head -n1

    The following results are possible:

    • A No such file or directory error means the driver is not installed.
    • The command output shows a driver version. This means the driver is already installed and the NVIDIA stack was initialized successfully. Go to Updating the Linux GPU driver.
    • nvidia-smi runs, but the output shows a ... couldn't communicate with the NVIDIA driver error. This means the driver is damaged or an incorrect version is used (for example, for vGPU). Reinstall the driver: first remove the GPU driver, then install it again by repeating the steps in this instruction.
  4. Install the driver:

    1. Determine your distribution version:

      cat /etc/os-release
    2. Download and install the cuda-keyring_1.1-1_all.deb package from the NVIDIA CUDA repository for the corresponding version of your distribution:

      wget https://developer.download.nvidia.com/compute/cuda/repos/<DISTRIBUTION><VERSION>/x86_64/cuda-keyring_1.1-1_all.deb && \sudo dpkg -i cuda-keyring_1.1-1_all.deb

      Here:

      • <DISTRIBUTION> — the distribution name in Latin letters.
      • <VERSION> — the distribution version. Numbers only, without dots.

      Examples: debian13, ubuntu2404.

    3. Update the package manager indexes:

      sudo apt update
    4. Make sure the required or a newer driver version is available for installation:

      apt-cache policy cuda-drivers

      If the command succeeds, the output will include a Candidate field indicating the version to be installed from the cuda-drivers meta-package.

    5. Install the driver:

      sudo apt -y install cuda-drivers-<BRANCH_VERSION>

      Here <BRANCH_VERSION> is the major version number of the driver you need to install. For example, 550.

    1. Check that the driver is installed:

      nvidia-smi --query-gpu=driver_version --format=csv,noheader| head -n1
    2. If running the command results in a command not found error, add nvidia-smi to the environment variables manually:

      echo 'export PATH="$PATH:/usr/bin"' | sudo tee /etc/profile.d/nvidia-smi-path.sh >/dev/null &&source /etc/profile.d/nvidia-smi-path.sh
    3. Check again that nvidia-smi works:

      nvidia-smi --query-gpu=driver_version --format=csv,noheader| head -n1
    4. Reboot the VM.

Was this article helpful?