Nvidia Fedora Notes
Table of Contents
1. Driver Installation
1.1. Prerequisites
Identify Graphics Card . Run the following command to identify the graphics card:
lspci | grep -E "VGA|3D"
Sample Result
2a:00.0 VGA compatible controller: NVIDIA Corporation GA102 [GeForce RTX 3090] (rev a1)
1.2. Install Nvidia Driver
-
Add the graphics drivers PPA
sudo apt update && sudo add-apt-repository ppa:graphics-drivers/ppa -
Identify graphics card and list suggested drivers
ubuntu-drivers devicesSample== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00001E07sv00003842sd00002382bc03sc00i00 vendor : NVIDIA Corporation model : TU102 [GeForce RTX 2080 Ti Rev. A] driver : nvidia-driver-418-server - distro non-free driver : nvidia-driver-470-server - distro non-free driver : nvidia-driver-535 - distro non-free recommended driver : nvidia-driver-545 - distro non-free driver : nvidia-driver-450-server - distro non-free driver : nvidia-driver-470 - distro non-free driver : nvidia-driver-535-server - distro non-free driver : nvidia-driver-545-open - distro non-free driver : nvidia-driver-535-server-open - distro non-free driver : nvidia-driver-535-open - distro non-free driver : xserver-xorg-video-nouveau - distro free builtin
-
Install
Specific driversudo ubuntu-drivers install nvidia-driver-xxxReboot after installation:
sudo reboot -
Confirm the installation by running:
nvidia-smiShow sample output
Sun May 25 10:52:43 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 570.153.02 Driver Version: 570.153.02 CUDA Version: 12.8 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 3090 Off | 00000000:2A:00.0 Off | N/A | | 0% 59C P0 72W / 350W | 0MiB / 24576MiB | 4% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+
1.3. Install the Nvidia Toolkit:
-
Add NVIDIA package repository and GPG key
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list -
Update
sudo apt update -
Install
sudo apt-get install -y nvidia-container-toolkit -
Confirm
which nvidia-ctk
2. Generate the CDI Specification
-
Mkdir
sudo mkdir -p /etc/cdi -
Generate the
CDIspecification:sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml -
Confirm
CDIconfig.:sudo nvidia-ctk cdi list infoSample ResultINFO[0000] Found 3 CDI devices nvidia.com/gpu=0 nvidia.com/gpu=GPU-91437e5f-12345-12345-1234-b3c6a1304e7f nvidia.com/gpu=all
2.1. Podman
-
Test:
podman run --rm --device nvidia.com/gpu=all --security-opt=label=disable docker.io/nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smiShow sample output
Sample output+-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 595.84 Driver Version: 595.84 CUDA Version: 13.2 | +-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 3090 Off | 00000000:2A:00.0 Off | N/A | | 0% 45C P8 24W / 350W | 1MiB / 24576MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+