Tensorrt on Jetson with python 3.9

Hi,

im following up on Can TensorRT work on python 3.9 on Jetson AGX Xavier? and try to get tensorrt to run with python 3.9 on nvidia jetson NX.

As far as i understand i need to build TensorRT OSS (GitHub - NVIDIA/TensorRT: TensorRT is a C++ library for high performance inference on NVIDIA GPUs and deep learning accelerators.) on the jetson in order to run the build script as described in TensorRT/python at main · NVIDIA/TensorRT · GitHub to create python wheel file.
Is that the correct approach to get it running?

The first problem i encounter is actually building TensorRT OSS on the jetson, as i need to specify " TRT_LIB_DIR : Path to the TensorRT installation directory containing libraries." (see GitHub - NVIDIA/TensorRT: TensorRT is a C++ library for high performance inference on NVIDIA GPUs and deep learning accelerators.), which i cannot find. I used the sd-card method to get my jetson running and can only find the preinstalled tensorrt under /usr/src/tensorrt which does not seem to incluce libraries. Am i missing something here?

Hi,

Please install the TensorRT C++ library first and build a python binding for python3.9 from OSS GitHub.
The TensorRT C++ library can be found in SDK manager or installed via the following command:

$ sudo apt update
$ sudo apt install nvidia-tensorrt

After that, the header and library can be found in the below folder:

$ ll /usr/include/aarch64-linux-gnu/NvInfer*
-rw-r--r-- 1 root root 268726 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInfer.h
-rw-r--r-- 1 root root  42497 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInferImpl.h
-rw-r--r-- 1 root root   6176 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h
-rw-r--r-- 1 root root  11327 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInferPlugin.h
-rw-r--r-- 1 root root  11819 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInferPluginUtils.h
-rw-r--r-- 1 root root  60163 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h
-rw-r--r-- 1 root root  94791 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInferRuntime.h
-rw-r--r-- 1 root root   3148 Jun 25 20:17 /usr/include/aarch64-linux-gnu/NvInferVersion.h
$ ll /usr/lib/aarch64-linux-gnu/libnvinfer*
lrwxrwxrwx 1 root root        26 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so -> libnvinfer_plugin.so.8.0.1
lrwxrwxrwx 1 root root        26 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.8 -> libnvinfer_plugin.so.8.0.1
-rw-r--r-- 1 root root  18280576 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.8.0.1
-rw-r--r-- 1 root root  21018654 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer_plugin_static.a
lrwxrwxrwx 1 root root        19 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer.so -> libnvinfer.so.8.0.1
lrwxrwxrwx 1 root root        19 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer.so.8 -> libnvinfer.so.8.0.1
-rw-r--r-- 1 root root 188463744 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer.so.8.0.1
-rw-r--r-- 1 root root 333591900 Jun 25 20:17 /usr/lib/aarch64-linux-gnu/libnvinfer_static.a

Thanks.