https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
- Remove any preinstalled drivers, or nvidia stuff with this
- Use GCP provided script to install the latest cuda and drivers.
- Reboot the system and verify
nvidia-smiandnvcc - Download tar file for cudnn from here
- Extract and copy library files from /lib folder to $LD_LIBRARY_PATH folder (maybe
/usr/local/cuda-11/lib64/) pip install tensorflowshould work with GPU support now.