Gpu not enabled for tensorflow

On a PC with NVIDIA GeForce RTX 2060 and Ubuntu version 20, when running the following code:
import tensorflow as tf device_name = tf.test.gpu_device_name()

I am advised to follow the instructions at this link because:

Could not load dynamic library ‘’; dlerror: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.2/lib64

Those instructions did not solve the issue,

However the guide covers ubuntu version 16 and 18

Can you make the same test in our Docker image?

the issue has been solved by applying a workaround:

Use these guidelines and specifically:

One workaround is to install libcusolver-11-0 side by side with cuda-11-1 or cuda-11-2 and tweak your LD_LIBRARY_PATH. For example, to get TensorFlow 2.4 to work with CUDA 11.2:

$ apt-get install cuda-11-2 libcusolver-11-0

$ export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64:/usr/local/cuda-11.0/lib64