dusty-nv / jetson-inference

Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
https://developer.nvidia.com/embedded/twodaystoademo
MIT License
7.75k stars 2.97k forks source link

OpenCV Compilation Error When Building Docker Conatiner on x86 #1751

Closed mohamad1998630 closed 10 months ago

mohamad1998630 commented 11 months ago

Hi there, I am trying to build the docker container on an x86 architecture but I am facing an error with OpenCV. Here is the error message: 38.17 -- CUDA version: 11.7 38.18 CMake Error at /usr/lib/cmake/opencv4/OpenCVConfig.cmake:111 (message): 38.18 OpenCV static library was compiled with CUDA 11.6 support. Please, use the 38.18 same version or rebuild OpenCV with CUDA 11.7 38.18 Call Stack (most recent call first): 38.18 CMakeLists.txt:90 (find_package)

I tried to configure the cuda version that opencv compiles with as suggested by the error message but could not figure how to do it. Note that both these versions are different from my host machine cuda version which is 12.0.

Could anyone support on this matter?

dusty-nv commented 11 months ago

Are you installing your own build of OpenCV instead of the one that is installed for JetPack+aarch64 here?

https://github.com/dusty-nv/jetson-inference/blob/44c7661dfbb97018fbc4651fa4608d5491d3f39e/Dockerfile#L89

You can just skip doing that on x86 and install normal version of OpenCV

mohamad1998630 commented 11 months ago

Thanks for your quick replay @dusty-nv

I did not change this line so I guess I am trying to install a version that is built for JetPack and aarch64 as you said. I will try to install a normal opencv version as you suggested and see how it goes.

I really appreciate your help

mohamad1998630 commented 10 months ago

I tried compiling a normal version of opencv and it worked fine. Thanks for the support @dusty-nv. I will close the issue now