nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv,noheader
# Example Output: NVIDIA GeForce RTX 4050 Laptop GPU, 6141 MiB, 580.65.06
Watch nvidia gpu status
watch nvidia-smi
# or
watch -n 2 'nvidia-smi'
Install CUDA on WSL2
sudo apt-key del 7fa2af80
curl -L <https://gist.githubusercontent.com/moracabanas/63070d9012ad4b95e86a4004caac5a9d/raw/install_cuda12.2_wsl2.sh> | bash
Cuda Toolkit 12.3.2
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=runfile_local
Check if CUDA Available in Python
import torch; torch.cuda.is_available()
python3 -m pip install tensorflow[and-cuda]
# Verify the installation:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
https://developer.nvidia.com/rdp/cudnn-archive
https://docs.nvidia.com/deeplearning/cudnn/installation/linux.html
https://portal.databasemart.com/kb/a2128/6-steps-to-install-gpu-accelerated-tensorflow.aspx
https://developer.nvidia.com/cudnn-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local
https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
https://medium.com/@gokul.a.krishnan/how-to-install-cuda-cudnn-and-tensorflow-on-ubuntu-22-04-2023-20fdfdb96907