onnxruntime_ep_tensorrt: Contains files for the TensorRT plugin EP Python package.__init__.pyprovides helper functions to get the EP library path and the EP name.setup.py: Script to generate the Python package wheel.example_usage: Contains a script showing example usage of the TensorRT plugin EP Python Package.
Follow instructions here to build the native library.
Set the environment variable TENSORRT_PLUGIN_EP_LIBRARY_PATH to the path to the native plugin EP shared library. E.g., onnxruntime_ep_tensorrt.dll on Windows or libonnxruntime_ep_tensorrt.so on Linux.
Run setup.py from this directory.
python setup.py bdist_wheel
The wheel will be generated in the ./dist directory.
Install the Python package wheel built in the previous step.
pip install ./dist/onnxruntime_ep_tensorrt-0.1.0-<version and platform-specific text>.whl
Run the Python example usage script.
cd example_usage
# install other prerequisites
pip install onnxruntime numpy
python ./example_usage.py