Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

641
Views
Cmake de OpenCV no puede encontrar CUDA mientras crea una imagen para Docker

Estoy tratando de construir una imagen acoplable con la última versión de opencv 4.1.0 para poder usar cudafeatures2D. Tengo cuda 9.0 instalado pero cada vez que intento compilar opencv desde la fuente dice que no encuentra CUDA.

Estoy usando la imagen de compilación en tiempo de ejecución DESDE nvidia/cuda:9.0-cudnn7-runtime. Y revisé en mi imagen actual la ubicación de CUDA, /usr/local/cuda-9.0 .

Este es el código que estoy usando para instalar:

 ENV PATH=$PATH:/usr/local/cuda/bin:$PATH ENV LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH RUN ldconfig RUN wget https://github.com/opencv/opencv/archive/4.1.0.tar.gz && tar xf 4.1.0.tar.gz && rm 4.1.0.tar.gz RUN wget https://github.com/opencv/opencv_contrib/archive/4.1.0.tar.gz && tar xf 4.1.0.tar.gz && rm 4.1.0.tar.gz RUN cd opencv-4.1.0/ && mkdir build && cd build && cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D WITH_CUBLAS=ON -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_OPENGL=ON -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" -D PYTHON2_EXECUTABLE=/usr/bin/python2.7 -D PYTHON_INCLUDE_DIR=/usr/include/python2.7/ -D PYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python2.7/ -D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so -D PYTHON2_NUMPY_INCLUDE_DIRS=/usr/local/lib/python2.7/dist-packages/numpy/core/include/ -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.1.0/modules/ -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.0 -D CUDA_CUDART_LIBRARY=/usr/local/cuda/lib64/libcudart.so -D CUDA_VERBOSE_BUILD=ON .. && make -j$(nproc) && make install

Pero siempre me sale este error:

 -- at: /app/opencv-3.4.6/build/3rdparty/ippicv/ippicv_lnx/iw CMake Warning at cmake/OpenCVFindLibsPerf.cmake:35 (message): OpenCV is not able to find/configure CUDA SDK (required by WITH_CUDA). CUDA support will be disabled in OpenCV build. To eliminate this warning remove WITH_CUDA=ON CMake configuration option. Call Stack (most recent call first): CMakeLists.txt:794 (include)
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

finalmente alguien del repositorio de opencv señaló que el problema que estaba teniendo se debía a la imagen que estaba usando:

DESDE nvidia/cuda:9.0-cudnn7-tiempo de ejecución

La versión de tiempo de ejecución generalmente no contiene los archivos SDK, la solución fue cambiar -runtime por -develop.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!