Installing CUDA on Rocky Linux

This guide is specifically for Rocky Linux 8.x.

Step 1: Update the system version and kernel

sudo dnf update && sudo dnf upgrade -y

Step 2: Install epel-release

sudo dnf install epel-release

Step 3: Add the NVIDIA repository

`sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo 176·

Step 4: Install the corresponding development tools and header files

sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

Step 5: Install the NVIDIA driver

sudo dnf install nvidia-driver nvidia-settings

Step 6: Install the CUDA driver

sudo dnf install cuda-driver

Step 7: Reboot the system

sudo reboot now

Step 8: Verify the successful installation

nvidia-smi

If the output resembles the image shown below, the installation was successful.

results matching ""

    No results matching ""