TensorFlow GPU/ Uninstall cuda 12.2 for installation 11.9 Fedora 37

Hello everyone! I encountered the following problem:
When I enter “nvidia-smi” it shows CUDA version 12.2
I need version 11.8. How can i do this?

In the second question: After installing tensorflow, when entering

python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

displays

I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-10-29 14:35:46.029307: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2023-10-29 14:35:46.525760: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:995] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2023-10-29 14:35:46.547837: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1960] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...

I have TensorRT 8.6.1 (instal rpm)
cudnn 8.9.5.30 (rpm)

Hi @ferzulla2003 ,
You can purge everything first, then install latest driver from distro repo, and then the cuda toolkit(needed version) from nvidia repo.
Thanks

unknown