This repository contains the wheel files and build scripts for ONNX Runtime with GPU support on Jetson platforms.
Modify the build arguments according to your environment.
docker build \
--build-arg L4T_VERSION=nvcr.io/nvidia/l4t-ml:r35.2.1-py3 \
--build-arg ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime \
--build-arg ONNXRUNTIME_COMMIT=v1.16.3 \
--build-arg BUILD_CONFIG=Release \
--build-arg CMAKE_VERSION=3.28.1 \
--build-arg CPU_ARCHITECTURE=aarch64 \
--build-arg CUDA_ARCHITECTURES="70;72;75;80;86;87" \
-t onnx-builder \
-f Dockerfile .
Add --runtime nvidia
if necessary.
docker run --rm onnx-builder bash -c "python3 -c 'import onnxruntime; print(onnxruntime.get_available_providers())'"
To check the outputs, run:
docker run -it --rm onnx-builder bash
Then, inside the container:
cd /output
Retrieve the wheel file from the ./export
directory.
docker run --rm -v $(pwd)/export:/export onnx-builder bash -c "cp /output/onnxruntime_gpu-*.whl /export"
sudo chown -R $(id -u):$(id -g) ./export
This project is based upon the work shared by seddonm1: GitHub Gist - seddonm1