Amazon Linux#

This section covers:

  • Amazon Linux 2023

Preparation#

  1. Perform the Pre-installation Actions.

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

    # dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
    
  3. 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}.rpm
    

    where ${version} is the NVIDIA driver version

  2. Install local repository on file system:

    # rpm --install nvidia-driver-local-repo-${distro}.${version}*.${arch}.rpm
    

Network Repository Installation#

  1. Enable the network repository. For x86_64:

    # dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/${distro}/${arch}/cuda-${distro}.repo
    

    For aarch64:

    # dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/${distro}/sbsa/cuda-${distro}.repo
    
  2. Clean DNF repository cache:

    # dnf clean expire-cache
    

Driver Installation#

These instructions apply to both local and network installations.

Module Streams

# dnf module install nvidia-driver:<stream>/<profile>

Open Kernel Modules

# dnf module enable nvidia-driver:open-dkms
# dnf install nvidia-open

where profile by default is default and does not need to be specified.

  • Example dkms streams: 580-open or open-dkms

Proprietary Kernel Modules

# dnf module enable nvidia-driver:latest-dkms
# dnf install cuda-drivers

where profile by default is default and does not need to be specified.

  • Example dkms streams: 580-dkms or latest-dkms

Reboot the System#

# reboot

Perform the Post-installation Actions.

Package Upgrades#

When a new version is available, a normal package update command specific for the distribution should suffice in upgrading the driver. The various differences in distributions would take care of obsolency and package switching when performing upgrades to a different branch.

When upgrading the driver to the same stream:

# dnf update

When upgrading the driver to a different stream:

# dnf module reset nvidia-driver
# dnf module enable nvidia-driver:<stream>
# dnf update --allowerasing

Or when switching from proprietary modules to open modules:

# dnf module reset nvidia-driver
# dnf module enable nvidia-driver:<stream>
# dnf install nvidia-open --allowerasing