-
-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to complete install with CUDA (make install_cuda) #1173
Comments
Bug: Unknown argument Description:
After inspecting the Here is the relevant excerpt from the build_cuda:
cd $(TMP_DIR)opencv/opencv-$(OPENCV_VERSION)
mkdir build
cd build
rm -rf *
cmake -j $(shell nproc --all --ignore 1) -D CMAKE_BUILD_TYPE=RELEASE ...
$(MAKE) -j $(shell nproc --all --ignore 1)
$(MAKE) preinstall
cd - Proposed Fix: Here is the corrected version of the build_cuda:
cd $(TMP_DIR)opencv/opencv-$(OPENCV_VERSION)
mkdir build
cd build
rm -rf *
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \
-D OPENCV_EXTRA_MODULES_PATH=$(TMP_DIR)opencv/opencv_contrib-$(OPENCV_VERSION)/modules \
-D BUILD_DOCS=OFF \
-D BUILD_EXAMPLES=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_PERF_TESTS=ON \
-D BUILD_opencv_java=NO \
-D BUILD_opencv_python=NO \
-D BUILD_opencv_python2=NO \
-D BUILD_opencv_python3=NO \
-D WITH_JASPER=OFF \
-D WITH_TBB=ON \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DWITH_CUDA=ON \
-DENABLE_FAST_MATH=1 \
-DCUDA_FAST_MATH=1 \
-DWITH_CUBLAS=1 \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda/ \
-DBUILD_opencv_cudacodec=OFF \
-D WITH_CUDNN=ON \
-D OPENCV_DNN_CUDA=ON \
-D CUDA_ARCH_BIN=7.5 \
-D CUDA_GENERATION=Auto ..
$(MAKE) -j $(shell nproc --all --ignore 1)
$(MAKE) preinstall
cd - |
So, I has two issues here, the first one was that the -j $(shell nproc --all --ignore 1) should be removed from the cmake command in the build_cuda step. the second one, was that I had my cuda directory at /usr/local/cuda-12/, and the Makefile is pointing to /usr/local/cuda/. So I just changed the route and it compiled successfully |
just checked the DNN Pose Detection example setting CUDA as default backend, it works way better now comparing to the CPU, so I'm going to close the issue myself as it is finally solved 🚀 |
Description
I installed CUDA & cDNN following the guides, and then tried the
make install_cuda
from the root of gocv. But it fails, I can complete themake install
and it shows this message:but with make install_cuda happens this:
Steps to Reproduce
Your Environment
Processor: 13th Intel Core i5-13500Hx16
Graphics: NVIDIA RTX4050 / Mesa Intel® Graphics (RPL-P)
Operating System and version: Ubuntu 22.04.4 x64
OpenCV version used:
How did you install OpenCV? following this tutorial: https://gist.github.com/raulqf/f42c718a658cddc16f9df07ecc627be7
GoCV version used: gocv version: 0.36.1
Go version: go version go1.22.0 linux/amd64
Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
? NoThe text was updated successfully, but these errors were encountered: