Created
January 31, 2026 12:18
-
-
Save pliablepixels/73d61e28060c8d418f9fcfb1e912e425 to your computer and use it in GitHub Desktop.
Ubuntu 24 notes for OpenCV latest version and 1050 NVIDIA GPU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget https://developer.download.nvidia.com/compute/nvidia-driver/590.48.01/local_installers/nvidia-driver-local-repo-ubuntu2404-590.48.01_1.0-1_amd64.deb | |
| sudo dpkg -i nvidia-driver-local-repo-ubuntu2404-590.48.01_1.0-1_amd64.deb | |
| wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run | |
| sudo sh cuda_11.8.0_520.61.05_linux.run --toolkit --silent --override | |
| sudo apt install libcudnn8-dev=8.9.7.29-1+cuda11.8 libcudnn8=8.9.7.29-1+cuda11.8 | |
| Add to your ~/.bashrc: | |
| export PATH=/usr/local/cuda-11.8/bin:$PATH | |
| export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH | |
| Then: | |
| source ~/.bashrc | |
| nvcc --version | |
| Should show release 11.8. | |
| nvidia-smi - can show 13 etc | |
| sudo apt install gcc-11 g++-11 | |
| cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
| -D INSTALL_PYTHON_EXAMPLES=ON \ | |
| -D INSTALL_C_EXAMPLES=OFF \ | |
| -D OPENCV_ENABLE_NONFREE=ON \ | |
| -D WITH_CUDA=ON \ | |
| -D CUDA_ARCH_BIN=6.1 -D CUDA_ARCH_PTX="" \ | |
| -D WITH_CUDNN=ON \ | |
| -D OPENCV_DNN_CUDA=ON \ | |
| -D ENABLE_FAST_MATH=1 \ | |
| -D CUDA_FAST_MATH=1 \ | |
| -D WITH_CUBLAS=1 \ | |
| -D OPENCV_EXTRA_MODULES_PATH=/home/arjunrc/opencv_contrib/modules \ | |
| -D HAVE_opencv_python3=ON \ | |
| -D PYTHON_EXECUTABLE=/usr/bin/python3 \ | |
| -D CMAKE_C_COMPILER=/usr/bin/gcc-11 \ | |
| -D CMAKE_CXX_COMPILER=/usr/bin/g++-11 \ | |
| -D CUDA_HOST_COMPILER=/usr/bin/gcc-11 \ | |
| -D BUILD_EXAMPLES=ON .. | |
| # don't use nproc - I have 18 - gets stuck | |
| make -j10 | |
| sudo make install | |
| Refer to yolo.py gist to fix file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment