Hi, I am build up a container for AGX Orin but see the error below.
You can reproduce it using the test case: Github
Thanks!
1: unknown file: Failure
1: C++ exception with description “std::bad_alloc: cudaErrorInsufficientDriver: CUDA driver version is insufficient for CUDA runtime version” thrown in the test body.
1:
1: [ FAILED ] CUDAfunction.test_cuMath_vec (0 ms)
1: [----------] 1 test from CUDAfunction (0 ms total)
1:
1: [----------] Global test environment tear-down
1: [==========] 1 test from 1 test suite ran. (0 ms total)
1: [ PASSED ] 0 tests.
1: [ FAILED ] 1 test, listed below:
1: [ FAILED ] CUDAfunction.test_cuMath_vec
My environment and Dockerfile:
NVRM version: NVIDIA UNIX Open Kernel Module for aarch64 540.3.0 Release Build (buildbrain@mobile-u64-6367-d8000) Mon May 6 10:21:04 PDT 2024
GCC version: collect2: error: ld returned 1 exit status
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Apr_17_19:34:47_PDT_2024
Cuda compilation tools, release 12.5, V12.5.40
Build cuda_12.5.r12.5/compiler.34177558_0
Please also add the cuda-compat-12-5 installation command in your Dockerfile.
To run a newer CUDA library on the older driver will require the compat lib.
You can also find the compat lib is listed in the installation command on our CUDA website:
# git clone https://github.com/weimin023/testcuda.git
# cd testcuda/
# cmake . && make
-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 12.3.0
-- The CUDA compiler identification is NVIDIA 12.5.40
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda-12.5 (found suitable version "12.5", minimum required is "12.3")
-- Found GTest: /usr/local/lib/cmake/GTest/GTestConfig.cmake (found version "1.14.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /testcuda
[ 50%] Building CUDA object CMakeFiles/unittest.dir/unittest.cu.o
[100%] Linking CUDA executable unittest
[100%] Built target unittest
# ./unittest
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 1 test from CUDAfunction
[ RUN ] CUDAfunction.test_cuMath_vec
[ OK ] CUDAfunction.test_cuMath_vec (278 ms)
[----------] 1 test from CUDAfunction (278 ms total)
[----------] 1 test from opencv
[ RUN ] opencv.open
[ OK ] opencv.open (0 ms)
[----------] 1 test from opencv (0 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 2 test suites ran. (278 ms total)
[ PASSED ] 2 tests.