These are the steps I took for the installation of the NVIDIA drivers and CUDA toolkit for use with TensorFlow on Fedora 35. I have documented them since I had a lot of difficulty getting it to work and couldn't boot to a graphical desktop a few times. These steps worked for me, hopefully they do for others.
I am running on a 64 bit system and used KDE Plasma with X11 so these instructions may differ for people using GNOME, Wayland and any other combinations.
- If you have installed any NVIDIA drivers other than the
akmod-nvidia
drivers from the@rpmfusion-nonfree
repo, remove them completely. - Remove any other NVIDIA/CUDA installations. Find them with
sudo dnf list installed | egrep '(nvidia|cuda)'
- If the
nvidia-driver
module is enabled, disable it -sudo dnf module disable nvidia-driver
- this caused me issues when trying to install the akmod drivers