Installing the Linux GPU driver
-
Check your VM's configuration type:
- Go to your VK Cloud personal account.
- Go to Cloud Computing → Virtual Machines.
- 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.
-
Connect to the VM with the GPU, or create a new one if you haven't done so already.
-
Check whether the GPU driver is installed:
/usr/bin/nvidia-smi --query-gpu=driver_version --format=csv,noheader| head -n1The following results are possible:
- A
No such file or directoryerror 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-smiruns, but the output shows a... couldn't communicate with the NVIDIA drivererror. 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.
- A
-
Install the driver:
Ubuntu/DebianRed Hat Enterprise Linux-
Determine your distribution version:
cat /etc/os-release -
Download and install the
cuda-keyring_1.1-1_all.debpackage 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.debHere:
<DISTRIBUTION>— the distribution name in Latin letters.<VERSION>— the distribution version. Numbers only, without dots.
Examples:
debian13,ubuntu2404. -
Update the package manager indexes:
sudo apt update -
Make sure the required or a newer driver version is available for installation:
apt-cache policy cuda-driversIf the command succeeds, the output will include a
Candidatefield indicating the version to be installed from thecuda-driversmeta-package. -
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.
-
Check that the driver is installed:
nvidia-smi --query-gpu=driver_version --format=csv,noheader| head -n1 -
If running the command results in a
command not founderror, addnvidia-smito 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 -
Check again that
nvidia-smiworks:nvidia-smi --query-gpu=driver_version --format=csv,noheader| head -n1 -
Reboot the VM.
-