Debian#

This section covers:

  • Debian 12

Preparation#

  1. Perform the Pre-installation Actions.

  2. The kernel headers and development packages for the currently running kernel can be installed with:

    # apt install linux-headers-$(uname -r)
    
  3. Enable the contrib repository:

    # add-apt-repository contrib
    
  4. Choose an installation method: Local Repository Installation or Network Repository Installation.

Local Repository Installation#

  1. Download the NVIDIA driver:

    $ wget https://developer.download.nvidia.com/compute/nvidia-driver/$version/local_installers/nvidia-driver-local-repo-$distro-$version_$arch.deb
    

    where $version is the NVIDIA driver version

  2. Install local repository on file system:

    # dpkg -i nvidia-driver-local-repo-$distro-$version*_$arch.deb
    # apt update
    
  3. Enroll ephemeral public GPG key:

    # cp /var/nvidia-driver-local-repo-$distro-$version/nvidia-driver-*-keyring.gpg /usr/share/keyrings/
    

Network Repository Installation#

amd64#

  1. Install the new cuda-keyring package:

    $ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/x86_64/cuda-keyring_1.1-1_all.deb
    # dpkg -i cuda-keyring_1.1-1_all.deb
    # apt update
    

If you are unable to install the cuda-keyring package you can follow these instructions:

  1. Enroll the new signing key:

    $ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/x86_64/cuda-archive-keyring.gpg
    # mv cuda-archive-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpg
    
  2. Enable the network repository:

    # echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/$distro/x86_64/ /" \
        | tee /etc/apt/sources.list.d/cuda-$distro-$arch.list
    

arm64#

  1. Install the new cuda-keyring package:

    $ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/sbsa/cuda-keyring_1.1-1_all.deb
    # dpkg -i cuda-keyring_1.1-1_all.deb
    # apt update
    

If you are unable to install the cuda-keyring package you can follow these instructions:

  1. Enroll the new signing key:

    $ wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/sbsa/cuda-archive-keyring.gpg
    # mv cuda-archive-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpg
    
  2. Enable the network repository:

    # echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/$distro/sbsa/ /" \
        | tee /etc/apt/sources.list.d/cuda-$distro-$arch.list
    

Driver Installation#

These instructions apply to both local and network installations.

Open Kernel Modules

# apt -V install nvidia-open

Proprietary Kernel Modules

# apt -V install cuda-drivers

Compute-only (Headless) and Desktop-only (no Compute) Installation#

It’s possible to install the driver without all the desktop components (GL, EGL, Vulkan, X drivers, and so on) to limit the footprint and dependencies on the system. With the same logic it’s possible to install a desktop system without any compute component.

Note

The components excluded at installation time can always be added at a later stage. This will pull in all the additional dependencies required.

Compute-only System#

Open Kernel Modules

# apt -V install nvidia-driver-cuda nvidia-kernel-open-dkms

Proprietary Kernel Modules

# apt -V install nvidia-driver-cuda nvidia-kernel-dkms

Desktop-only System#

Open Kernel Modules

# apt -V install nvidia-driver nvidia-kernel-open-dkms

Proprietary Kernel Modules

# apt -V install nvidia-driver nvidia-kernel-dkms

Reboot the System#

# reboot

Perform the Post-installation Actions.