-
This recipe install OpenCV with CUDA suport in a virtual environment. See https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html and specifically https://docs.opencv.org/4.x/db/d05/tutorial_config_reference.html. This also helps: https://rodosingh.medium.com/using-cmake-to-build-and-install-opencv-for-python-and-c-in-ubuntu-20-04-6c5881eebd9a
-
Install CUDA Toolkit from https://developer.nvidia.com/cuda-download. Use Download Installer for Linux Ubuntu 22.04 x86_64.
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda
- Reboot and check that nvidia-smi is working.