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?
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:
However there is a problem gernerating or using the python bindings. Following everything under TensorRT/python at main · NVIDIA/TensorRT · GitHub i’m able to create “tensorrt-8.0.1.6-cp39-none-linux_aarch64.whl” and installing it in a venv with python3 -m pip install build/dist/tensorrt-8.0.1.6-cp39-none-linux_aarch64.whl succeeds.
But import tensorrt fails with the following error.
import tensorrt
Traceback (most recent call last):
File “”, line 1, in
File “path/to/my/venv/lib/python3.9/site-packages/tensorrt/init.py”, line 36, in
from .tensorrt import *
ModuleNotFoundError: No module named ‘tensorrt.tensorrt’
the .whl file is only 3.8kb small and running the ./build.sh that generates the .whl file in TensorRT/python also has some suspicious logs:
– Generating done
– Build files have been written to:/path/to/TensorRT/python
make: *** No targets specified and no makefile found. Stop.
Generating python 3.9 bindings for TensorRT 8.0.1.6
It works. I dont know what went wrong before but following your guide with a fresh start solved it.
Thank you very much for putting the instructions together like that. That’s really awesome support.
Just as a note for others (and probably future me):
For the ./build.sh call (last step) i needed to additionally set the environment variables TARGET=aarch64 and PYTHON_MINOR_VERSION=9 in order to get the desired version of the .whl.
Also in 3. Prepare header the “$” in
tar -xvf data.tar.xz$ cp ./usr/include/aarch64-linux-gnu/python3.9/pyconfig.h python3.9/include/