Advanced Options#

This section contains information on some advanced setup scenarios which are not covered in the basic instructions above.

Meta Packages#

Meta packages are rpm/deb packages which contain no (or few) files but have multiple dependencies. They are used to install many CUDA packages when you may not know the details of the packages you want. The following table lists the meta packages. Not all of the packages listed below are available on every distribution. Sometime they are provided by other packages, sometimes they are not needed as there are other mechanisms offered by the distribution to provide branch segregation (ex. DNF modules).

Table 8 Kernel Module Meta Package#

Meta Package

Purpose

nvidia-open

Installs all NVIDIA open GPU kernel module driver packages.

Modularity Profiles#

Modularity profiles work with any supported modularity stream and allow for additional use cases. These modularity profiles are available on Amazon Linux 2023 and Red Hat Enterprise Linux 8/9.

Table 9 Modularity Profiles#

Stream

Profile

Use Case

Default

/default

Installs all the driver packages in a stream.

NVSwitch Fabric

/fm

For driver branches 615 and earlier, installs the driver packages plus the components required to bootstrap an NVSwitch system.

For example:

# dnf module install nvidia-driver:<stream>/default
# dnf module install nvidia-driver:615-open/fm

You can install multiple modularity profiles using BASH curly brace expansion, for example:

# dnf module install nvidia-driver:615-open/{default,fm}

The /fm profile is not available for driver branches 620 and later. Install the driver profile and the NVSwitch component packages separately:

# dnf module install nvidia-driver:620-open/default
# dnf install nvidia-fabricmanager-direct libnvidia-nscq nvidia-imex-direct
# dnf install libnvsdm  # x86_64 only

Please refer to the Developer Blog for more information.

Kickstart Installation#

Edit the Kickstart configuration file to add the necessary configuration. Replace the placeholder with the appropriate architecture.

Red Hat Enterprise Linux 8, AlmaLinux 8, Rocky Linux 8, Oracle Linux 8

  1. Enable the EPEL repository:

    repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/8/Everything/<arch>
    
  2. Enable the CUDA repository:

    repo --name=cuda-rhel8 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel8/<arch>
    
  3. Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling nouveau, etc.) by adding the following line in the %post section:

    nvidia-boot-update post
    

    This is the same command that is executed on a live system when installing the packages.

  4. Perform the Post-installation Actions.

Red Hat Enterprise Linux 9, AlmaLinux 9, Rocky Linux 9, Oracle Linux 9

  1. Enable the EPEL repository:

    repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/9/Everything/<arch>
    
  2. Enable the CUDA repository:

    repo --name=cuda-rhel9 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel9/<arch>/
    
  3. Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling nouveau, etc.) by adding the following line in the %post section:

    nvidia-boot-update post
    

    This is the same command that is executed on a live system when installing the packages.

Red Hat Enterprise Linux 10, AlmaLinux 10, Rocky Linux 10, Oracle Linux 10

  1. Enable the EPEL repository:

    repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/9/Everything/<arch>
    
  2. Enable the CUDA repository:

    repo --name=cuda-rhel9 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel9/<arch>/
    
  3. Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling nouveau, etc.) by adding the following line in the %post section:

    nvidia-boot-update post
    

    This is the same command that is executed on a live system when installing the packages.

KylinOS 11

  1. Enable the CUDA repository:

    repo --name=cuda-rhel9 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/kylin11/<arch>/
    
  2. Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling nouveau, etc.) by adding the following line in the %post section:

    nvidia-boot-update post
    

    This is the same command that is executed on a live system when installing the packages.

  3. Perform the Post-installation Actions.

SUSE Vendor Change#

Starting with driver version 575, all the driver packages for openSUSE Leap and SUSE Enterprise Linux Server have a vendor of “NVIDIA”. The system will prevent the update of packages hosted in the other repositories unless there is an override for the vendor.

More information on the topic is available in the Vendor Change page of openSUSE.

This can be triggered on the command line:

# zypper update --allow-vendor-change
Loading repository data...
Reading installed packages...

The following package is going to be upgraded:
  dkms

The following package is going to change vendor:
  dkms  openSUSE -> NVIDIA

1 package to upgrade, 1 to change vendor.

Package download size:    58.0 KiB

Package install size change:
              |     148.7 KiB  required by packages that will be installed
     5.4 KiB  |  -  143.3 KiB  released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y):

Or by adding the vendor equivalence to a Zypper configuration file. For example, in the case of openSUSE, just add “NVIDIA” at the end of this configuration file:

$ cat /etc/zypp/vendors.d/00-openSUSE.conf
[main]
vendors=openSUSE,SUSE,SUSE LLC <https://www.suse.com/>,NVIDIA

And then the upgrade can happen allowing the vendor change:

# zypper update --details
Loading repository data...
Reading installed packages...

The following package is going to be upgraded:
  dkms  3.0.11-bp156.1.2 -> 3.1.5-1  noarch  test  NVIDIA

1 package to upgrade.

Package download size:    58.0 KiB

Package install size change:
              |     148.7 KiB  required by packages that will be installed
     5.4 KiB  |  -  143.3 KiB  released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y):

Restrict APT to Look for Specific Architectures#

Modify Ubuntu’s apt package manager to query specific architectures for specific repositories. This is useful when a foreign architecture has been added, causing “404 Not Found” errors to appear when the repository meta-data is updated.

Each repository you wish to restrict to specific architectures must have its sources.list entry modified. This is done by modifying the /etc/apt/sources.list file and any files containing repositories you wish to restrict under the /etc/apt/sources.list.d/ directory. Normally, it is sufficient to modify only the entries in /etc/apt/sources.list.

An architecture-restricted repository entry looks like:

deb [arch=<arch1>,<arch2>] <url>

For example, if you wanted to restrict a repository to only the amd64 and i386 architectures, it would look like:

deb [arch=amd64,i386] <url>

It is not necessary to restrict the deb-src repositories, as these repositories don’t provide architecture-specific packages.

For more details, see the sources.list manpage.

APT Repository File not Found#

In case of the error: E: Failed to fetch file:/var/cuda-repo File not found on Debian and Ubuntu systems.

This can occur when installing CUDA after uninstalling a different version. Use the following command before installation:

# rm -v /var/lib/apt/lists/*cuda* /var/lib/apt/lists/*nvidia*

Verbose Versions when Using APT#

Use the --verbose-versions flag, for example:

# apt install --verbose-versions nvidia-open