# Which repo to use for nvidia and cuda drivers

**URL:** <https://forums.rockylinux.org/t/which-repo-to-use-for-nvidia-and-cuda-drivers/12612>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [January 24, 2024, 10:14am UTC](https://forums.rockylinux.org/t/which-repo-to-use-for-nvidia-and-cuda-drivers/12612 "2024-01-24T10:14:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [January 24, 2024, 11:16am UTC](https://forums.rockylinux.org/t/which-repo-to-use-for-nvidia-and-cuda-drivers/12612/2 "2024-01-24T11:16:48Z")

</div>

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):

```auto
$ 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:

```yaml
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):

```auto
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.

---

_[View the full topic](https://forums.rockylinux.org/t/which-repo-to-use-for-nvidia-and-cuda-drivers/12612)._
