Tensorflow 2.4.1 can't find GPUs
What finally worked for me was to create a new env from scratch using conda create --name <name> tensorflow-gpu and then adding the other deps to it. Creating a new env and then installing tensorflow-gpu didn't worked.
I'm trying to run TensorFlow on a Linux machine (ubuntu).
I've created a Conda env and installed the required packages but I think that there's something wrong with my versions:
Updated versions

cudatoolkit               11.6.0 cudatoolkit               11.2.0
cudnn                     8.1.0.77
tensorflow-gpu            2.4.1
python                    3.9.15

Running nvcc -V results

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA
Corporation Built on Mon_Oct_24_19:12:58_PDT_2022 Cuda compilation
tools, release 12.0, V12.0.76 Build
cuda_12.0.r12.0/compiler.31968024_0

and running python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" returns an empty list.
Seems that release 12.0 is the problem here, but I'm not sure and it's not my machine that I'm running on so I don't want to make big changes on my own.
Also, from TensorFlow's site, it seems that tensorflow-2.4.0 should run with python 3.6-3.8 and CUDA 11.0 but the versions I mentioned are the versions that the Conda choose for me.
I know that similar questions have been asked before, but I couldn't find an answer that works for me.