Skip to content
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

Trying to build into Docker Image - JetsonNX #83

Open
adrianosantospb opened this issue May 15, 2024 · 0 comments
Open

Trying to build into Docker Image - JetsonNX #83

adrianosantospb opened this issue May 15, 2024 · 0 comments

Comments

@adrianosantospb
Copy link

adrianosantospb commented May 15, 2024

Hello, everyone.

I'm trying to compile the opencv with GPU support into a Docker Image with:

CUDA: 10.2
TRT: 8.2.1.8
Jetson Pack: 32.4
Jetson Xavier RX.

The config and error log is following:

 General configuration for OpenCV 4.5.0 =====================================
--   Version control:               4.5.0
-- 
--   Extra modules:
--     Location (extra):            /tmp/build_opencv/opencv_contrib/modules
--     Version control (extra):     4.5.0
-- 
--   Platform:
--     Timestamp:                   2024-05-15T20:58:10Z
--     Host:                        Linux 4.9.337-tegra aarch64
--     CMake:                       3.10.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
-- 
--   CPU/HW features:
--     Baseline:                    NEON FP16
--       required:                  NEON
--       disabled:                  VFPV3
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                /usr/bin/c++  (ver 7.5.0)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--gc-sections -Wl,--as-needed  
--     Linker flags (Debug):        -Wl,--gc-sections -Wl,--as-needed  
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          m pthread cudart_static dl rt CUDA_nppc_LIBRARY-NOTFOUND CUDA_nppial_LIBRARY-NOTFOUND CUDA_nppicc_LIBRARY-NOTFOUND CUDA_nppicom_LIBRARY-NOTFOUND CUDA_nppidei_LIBRARY-NOTFOUND CUDA_nppif_LIBRARY-NOTFOUND CUDA_nppig_LIBRARY-NOTFOUND CUDA_nppim_LIBRARY-NOTFOUND CUDA_nppist_LIBRARY-NOTFOUND CUDA_nppisu_LIBRARY-NOTFOUND CUDA_nppitc_LIBRARY-NOTFOUND CUDA_npps_LIBRARY-NOTFOUND cublas cudnn CUDA_cufft_LIBRARY-NOTFOUND -L/usr/local/cuda/lib64 -L/usr/lib/aarch64-linux-gnu
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cnn_3dobj cvv hdf java js julia matlab ovis python2 sfm viz
--     Applications:                tests perf_tests apps
--     Documentation:               NO
--     Non-free algorithms:         YES
-- 
--   GUI: 
--     GTK+:                        YES (ver 3.22.30)
--       GThread :                  YES (ver 2.56.4)
--       GtkGlExt:                  NO
--     OpenGL support:              NO
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        /usr/lib/aarch64-linux-gnu/libjpeg.so (ver 80)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.6.34)
--     TIFF:                        /usr/lib/aarch64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
--     JPEG 2000:                   build (ver 2.3.1)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
-- 
--   Video I/O:
--     DC1394:                      YES (2.2.5)
--     FFMPEG:                      YES
--       avcodec:                   YES (57.107.100)
--       avformat:                  YES (57.83.100)
--       avutil:                    YES (55.78.100)
--       swscale:                   YES (4.8.100)
--       avresample:                YES (3.7.0)
--     GStreamer:                   YES (1.14.5)
--     v4l/v4l2:                    YES (linux/videodev2.h)
-- 
--   Parallel framework:            pthreads
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Lapack:                      YES (/usr/lib/aarch64-linux-gnu/liblapack.so /usr/lib/aarch64-linux-gnu/libcblas.so /usr/lib/aarch64-linux-gnu/libatlas.so)
--     Eigen:                       YES (ver 3.3.8)
--     Custom HAL:                  YES (carotene (ver 0.0.1))
--     Protobuf:                    build (3.5.1)
-- 
--   NVIDIA CUDA:                   YES (ver 10.2, CUFFT CUBLAS FAST_MATH)
--     NVIDIA GPU arch:             72
--     NVIDIA PTX archs:
-- 
--   cuDNN:                         YES (ver 8.0)
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /tmp/build_opencv/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python 3:
--     Interpreter:                 /usr/bin/python3 (ver 3.8)
--     Libraries:                   /usr/lib/aarch64-linux-gnu/libpython3.8.so (ver 3.8.0)
--     numpy:                       /usr/local/lib/python3.8/dist-packages/numpy/core/include (ver 1.23.1)
--     install path:                lib/python3.8/site-packages/cv2/python-3.8
-- 
--   Python (for build):            /usr/bin/python3
-- 
--   Java:                          
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
-- 
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cufft_LIBRARY (ADVANCED)
    linked by target "opencv_cudev" in directory /tmp/build_opencv/opencv_contrib/modules/cudev
    linked by target "opencv_test_cudev" in directory /tmp/build_opencv/opencv_contrib/modules/cudev/test
    linked by target "opencv_test_core" in directory /tmp/build_opencv/opencv/modules/core
    linked by target "opencv_perf_core" in directory /tmp/build_opencv/opencv/modules/core
    linked by target "opencv_core" in directory /tmp/build_opencv/opencv/modules/core
    linked by target "opencv_test_cudaarithm" in directory /tmp/build_opencv/opencv_contrib/modules/cudaarithm
    linked by target "opencv_cudaarithm" in directory /tmp/build_opencv/opencv_contrib/modules/cudaarithm
    linked by target "opencv_cudaarithm" in directory /tmp/build_opencv/opencv_contrib/modules/cudaarithm
    linked by target "opencv_perf_cudaarithm" in directory /tmp/build_opencv/opencv_contrib/modules/cudaarithm
    linked by target "opencv_flann" in directory /tmp/build_opencv/opencv/modules/flann
    linked by target "opencv_test_flann" in directory /tmp/build_opencv/opencv/modules/flann
    linked by target "opencv_perf_imgproc" in directory /tmp/build_opencv/opencv/modules/imgproc
    linked by target "opencv_test_imgproc" in directory /tmp/build_opencv/opencv/modules/imgproc
    linked by target "opencv_imgproc" in directory /tmp/build_opencv/opencv/modules/imgproc
    linked by target "opencv_test_intensity_transform" in directory /tmp/build_opencv/opencv_contrib/modules/intensity_transform
    linked by target "opencv_intensity_transform" in directory /tmp/build_opencv/opencv_contrib/modules/intensity_transform
    linked by target "opencv_test_ml" in directory /tmp/build_opencv/opencv/modules/ml
    linked by target "opencv_ml" in directory /tmp/build_opencv/opencv/modules/ml
    linked by target "opencv_test_phase_unwrapping" in directory /tmp/build_opencv/opencv_contrib/modules/phase_unwrapping
    linked by target "opencv_phase_unwrapping" in directory /tmp/build_opencv/opencv_contrib/modules/phase_unwrapping
    linked by target "opencv_plot" in directory /tmp/build_opencv/opencv_contrib/modules/plot
    linked by target "opencv_test_quality" in directory /tmp/build_opencv/opencv_contrib/modules/quality
    ...
CUDA_nppc_LIBRARY (ADVANCED)
    linked by target "opencv_cudev" in directory /tmp/build_opencv/opencv_contrib/modules/cudev
    ...

CUDA_nppial_LIBRARY (ADVANCED)
...
CUDA_nppicc_LIBRARY (ADVANCED)
...

Does anyone know how I fix it? I'm running the docker command line with GPU and NVIDIA runtime support:

docker run -it --gpus all --runtime nvidia nvcr.io/nvidia/l4t-tensorrt:r8.2.1-runtime:1.1.0-base-r8.2.1-runtime bash

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant