I have set up a virtual environment with Python3.8.10 inside a Docker container on the Jetson Orin Dev Kit. I want to run ONNX on device training within this venv. Therefore, I installed the onnx-runtime GPU version 1.17.0, which worked perfectly.
Additionally, for on-device training, the onnxruntime-training package is required. According to the getting started installation instructions by onnx-runtime, it can be installed as shown in the picture below.
But when I run this command inside my virtual environment the following error occures
(py38) $ pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT/pypi/simple/ onnxruntime-training
Looking in indexes: https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT/pypi/simple/
ERROR: Could not find a version that satisfies the requirement onnxruntime-training (from versions: none)
ERROR: No matching distribution found for onnxruntime-training
I managed to solve it. Now ONNX Runtime (ORT) on-device training works with GPU support on the Jetson Orin Dev Kit with JetPack v5.1.2. Unfortunately for ORT with training and GPU support, no ready-to-install Python wheel is available for an ARM architecture. Thus, it needs to be built from the source. Therefore the following steps are required:
Make sure to have `cmake >= v3.26 installed how-to
Make sure to have gcc, g++ v11.5 or newer installed how-to
ORT training depends on Torch. Since JetPack v5.1.2 forces Torch v2.1.0 and ORT recommends using the latest Torch version, ORT v1.16.3 should be used. Thus, the next step is to clone the ORT repository and check out the tag v1.16.3.
git clone --recursive https://github.com/Microsoft/onnxruntime.git
cd onnxruntime
git checkout v1.16.3
Build ORT and the Python wheel. You might need to adjust the CUDA paths and version:
are you sure that the packages from the link you provided support ONNX Runtime on-device training? I think I tried one of these packages and import onnxruntime.training failed with onnxruntime does not have an attribute training.