---
# System prepended metadata

title: CUDA 11.2

---

# CUDA 11.2
## Degradation
OS installed driver is `NVIDIA-SMI 520.61.05 | Driver Version: 520.61.05 | CUDA Version: 11.8`, but TensorFlow only supports up to CUDA 11.2 ([as of 20221022](https://www.tensorflow.org/install/source#gpu)).
### Removal
- [ ] `sudo apt --purge remove "cublas*" "cuda*"`
- [ ] `sudo apt --purge remove "nvidia*"`
- [ ] `sudo rm -rf /usr/local/cuda*`
- [ ] `sudo apt-get autoremove && sudo apt-get autoclean`
- [ ] `sudo reboot`
### Build Installation
- [ ] `sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev`
- [ ] `sudo apt-get update`
- [ ] `sudo apt-get upgrade`
- [ ] `sudo reboot`
### CUDA Installation
- [ ] `wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb`
- [ ] `sudo dpkg -i cuda-keyring_1.0-1_all.deb`
- [ ] `wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin`
- [ ] `sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600`
- [ ] `sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"`
- [ ] `sudo apt-get update`
- [ ] `sudo apt-get -y install cuda-11.2`
- [ ] `sudo reboot`
### Environment Variables Initialization
- [ ] `sudo echo 'export PATH=/usr/local/cuda-11.2/bin:$PATH' >> ~/.bashrc`
- [ ] `sudo echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc`
- [ ] `sudo reboot`
### CuDNN Installation
- [ ] Download `cudnn-11.2-linux-x64-v8.1.1.33.tgz`
- [ ] `tar -xzvf ~/Downloads/cudnn-11.2-linux-x64-v8.1.1.33.tgz`
- [ ] `sudo cp -P ~/cuda/include/cudnn.h /usr/local/cuda-11.2/include/`
- [ ] `sudo cp -P ~/cuda/include/cudnn_version.h /usr/local/cuda-11.2/include/`
- [ ] `sudo cp -P ~/cuda/lib64/libcudnn* /usr/local/cuda-11.2/lib64/`
- [ ] `sudo chmod a+r /usr/local/cuda-11.2/lib64/libcudnn*`
- [ ] `sudo rm -r ~/cuda/`
- [ ] `sudo reboot`
### Verification
- `nvcc --version`
https://www.youtube.com/watch?v=5eJTzhGe2QE
### Issue
https://askubuntu.com/questions/1408016/the-following-signatures-couldnt-be-verified-because-the-public-key-is-not-avai

## Admin Initialization on Boot
### GeForce GTX 1080 Ti & GeForce RTX 2080 SUPER
`echo 0 | sudo tee -a /sys/bus/pci/devices/0000:01:00.0/numa_node`
### Dual GeForce RTX 2080 Ti
`echo 0 | sudo tee -a /sys/bus/pci/devices/0000:73:00.0/numa_node`
`echo 0 | sudo tee -a /sys/bus/pci/devices/0000:d5:00.0/numa_node`
### Reference
https://stackoverflow.com/questions/44232898/memoryerror-in-tensorflow-and-successful-numa-node-read-from-sysfs-had-negativ