Python examples for Nvidia Drive

Dear Sir or Madam,

Software Version
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other, Drive AGX Orin

SDK Manager Version
1.9.3.10904
no sdk manager used.

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

I am trying out cuda and tensorrt examples as documented here. The cpp examples work perfectly fine for Drive OS.

Now I try to get the python examples running e.g. this one/usr/src/tensorrt/samples/python/yolov3_onnx. When following the instructions in the Readme I have to execute pip3 install -r requirements.txt which installs onnx==1.9.0. I did this directly on the drive and got the following error:

         53 |   template<typename> class auto_ptr;
            |                            ^~~~~~~~
      bpl-subset/bpl_subset/libs/thread/src/pthread/thread.cpp: In member function ‘bool pycudaboost::thread::do_try_join_until(const timespec&)’:
      bpl-subset/bpl_subset/libs/thread/src/pthread/thread.cpp:330:75: warning: control reaches end of non-void function [-Wreturn-type]
        330 |         detail::thread_data_ptr const local_thread_info=(get_thread_info)();
            |                                                                           ^
      aarch64-linux-gnu-g++ -pthread -Wno-unused-result -Wsign-compare -fwrapv -Wall -O3 -DNDEBUG -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset -I/tmp/pip-build-env-yp2xx8d6/overlay/lib/python3.8/site-packages/numpy/core/include -I/usr/include/python3.8 -c src/cpp/bitlog.cpp -o build/temp.linux-aarch64-cpython-38/src/cpp/bitlog.o
      aarch64-linux-gnu-g++ -pthread -Wno-unused-result -Wsign-compare -fwrapv -Wall -O3 -DNDEBUG -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset -I/tmp/pip-build-env-yp2xx8d6/overlay/lib/python3.8/site-packages/numpy/core/include -I/usr/include/python3.8 -c src/cpp/cuda.cpp -o build/temp.linux-aarch64-cpython-38/src/cpp/cuda.o
      In file included from src/cpp/cuda.cpp:4:
      src/cpp/cuda.hpp:14:10: fatal error: cuda.h: No such file or directory
         14 | #include <cuda.h>
            |          ^~~~~~~~
      compilation terminated.
      /tmp/pip-build-env-yp2xx8d6/overlay/lib/python3.8/site-packages/setuptools/command/build_py.py:220: _Warning: Package 'pycuda.cuda' is absent from the `packages` configuration.
      !!
      
              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'pycuda.cuda' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.
      
              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'pycuda.cuda' is explicitly added
              to the `packages` configuration field.
      
              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).
      
              You can read more about "package discovery" on setuptools documentation page:
      
              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
      
              If you don't want 'pycuda.cuda' to be distributed and are
              already explicitly excluding 'pycuda.cuda' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.
      
              You can read more about "package data files" on setuptools documentation page:
      
              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html
      
      
              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************
      
      !!
        check.warn(importable)
      error: command '/usr/bin/aarch64-linux-gnu-g++' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycuda
Failed to build onnx pycuda
ERROR: Failed to build installable wheels for some pyproject.toml based projects (onnx, pycuda)

The is probably because on the drive nvcc is missing: nvcc -version: nvcc::command not found.

So how should I install these requirements?
How do I get these python examples running under drive OS 6.0.4?

I am using Drive OS 6.04 for the Drive AGX Orin platform.

Best,
G

The doc you mentioned is for Drive OS which is not suitable for Jetson AGX Orin.
Are you using Jetson AGX Orin platform or DRIVE AGX Orin platform?

Edited the question: I am using Drive OS 6.04 for the Drive AGX Orin platform.

For DRIVE AGX Orin platform related SDK, OS …etc, issues, pleaes open your topic at Latest DRIVE AGX Orin/DRIVE AGX Orin General topics - NVIDIA Developer Forums.
Thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.