Which repo to use for nvidia and cuda drivers

First, ELRepo is awesome, but they chose to not build proprietary NVidia packages for EL9. It is understandable, since there are other repos that do. One of those are the RPMFusion repos.

The only repo to provide CUDA (that I know of) are the NVidia’s repos. They hold both the GPU driver and the CUDA, so that should definitely be a “matching pair”.

For that reason I do have (and EPEL repo is required too):

$ cat /etc/yum.repos.d/cuda-rhel9.repo 
[cuda-rhel9-x86_64]
baseurl = https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64
enabled = 1
gpgcheck = 1
gpgkey = https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/D42D0685.pub
name = cuda-rhel9-x86_64

I seem to install these packages:

for_driver:
- nvidia-driver
- nvidia-kmod-common
- nvidia-modprobe
- nvidia-settings
- nvidia-xconfig
- dnf-plugin-nvidia
- kernel-devel-matched
- dkms
for_cuda:
- cuda-runtime-11-8
- cuda-toolkit-11-8

I use actually non-latest CUDA and module stream (that was set before installing the packages):

dnf module reset nvidia-driver
dnf module enable nvidia-driver:525-dkms

One could select stream nvidia-driver:latest-dkms and see what versions that shows in the repository.