OnnxRuntime and libtorch on Jetson Orin NX

Hi!

I’m setting up a NVIDIA Jetson Orin NX with JetPack 6.2.1, L4T r36.4.0.

I have a cpp program that runs on libtorch, onnxruntime, pangolin, and other libraries, that runs on a docker container in my host computer (a regular 22.04 ubuntu).

When creating a new docker file with all the libraries for the Jetson, I’m having trouble with compiling the code, despite using the same project and modifying paths accordingly on the CMakelists.txt. The main issues are regarding libtorch in the arm architecture.

I provide both original Dockerfile that works correctly on the Ubuntu and the jetson-adapted Dockerfile, and would love any suggestions on what to include or exclude so I can get the exact behaviour I have on the ubuntu, but in the Jetson.

Thanks in advance

Dockerfile.txt (3.4 KB)

Dockerfile.jetson.txt (4.8 KB)

Hi,

Instead building the libraries from the source, could you try to install the package from the link below?

Thanks

Hi!

Sorry for the late response.

After changing the dockerfile, the errors now are

/usr/bin/ld: warning: libopenblas.so.0, needed by /opt/libtorch/lib/libtorch_cpu.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /workspace/lib/libORB_SLAM3.so: undefined reference to torch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<c10::Device>, bool)' /usr/bin/ld: /workspace/lib/libORB_SLAM3.so: undefined reference to c10::ListType::get(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, c10::Type::SingletonOrSharedTypePtr<c10::Type>)’
/usr/bin/ld: /workspace/lib/libORB_SLAM3.so: undefined reference to `at::_ops::to_device::call(at::Tensor const&, c10::Device, c10::ScalarType, bool, bool, c10::optional<c10::MemoryFormat>)’

The Dockerfile is as follows:

Dockerfile.nvidia.txt (5.0 KB)

Thanks!

Is this still an issue to support? Any result can be shared?

Hi,

The error is generated from the ORB_SLAM compilation.

Could you double-check the dependencies for it?
It looks like some prerequisites are missing.

Thanks.

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