Installing onnxsim on Jetson AGX Orin 64GB Developer Kit

I am unable to install onnxsim (onnxsim · PyPI) on the Jetson AGX Orin 64GB Developer Kit; I’d appreciate any help you can give. Thanks!

Hi,

Please try:

$ pip3 install onnxsim

Thanks.

Hi,

That’s how I tried to install onnxsim. Did you test this recommendation on your end to confirm it works? If yes, on what setup?

My setup:
Jetson AGX Orin 64GB Developer Kit
Jetpack Version: 6.0-b52 (confirmed with sudo apt show nvidia-jetpack -a)

Error: Installing onnxsim fails; it ends up in an infinite loop when building the wheels for setup.py.

I am further unable to install onnxsim in the jetson-containers docker containers (tried with l4t-pytorch and l4t-ml ).

FYI, I confirmed that the onnxsim installation works on a regular machine with Ubuntu 22.04.4

Hi,

We test it on an Orin with JetPack 5.1.3.
You will need to upgrade the cmake tool to 3.22 first.

$ pip3 install onnxsim
Collecting onnxsim
  Using cached onnxsim-0.4.36.tar.gz (21.0 MB)
  ...
Building wheels for collected packages: onnxsim
  Building wheel for onnxsim (setup.py) ... done
  Created wheel for onnxsim: filename=onnxsim-0.4.36-cp38-cp38-linux_aarch64.whl size=1984661 sha256=6933b2d0a8cc132a45b90c6af40e4daf16fc06f19a975b8c8493652ab6b1c178
  Stored in directory: /home/nvidia/.cache/pip/wheels/bc/10/57/06323985208edfd3d05e612045640b7772cea16d9ace3d67e4
Successfully built onnxsim
Installing collected packages: onnxsim
  WARNING: The script onnxsim is installed in '/home/nvidia/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed onnxsim-0.4.36

Could you share the output you met on the JetPack 6 environment so we can give it a check?

Thanks.

Thanks for the info. As I mentioned above, the install on Jetpack 6 gets stuck in an infinite loop when executing setup.py, so I am not sure I can share a meaningful output - can you clarify what info you are looking for exactly?

Hi,

Suppose you have some output log on the console.
Could you share with us so we can know which package causes the infinite loop.

Thanks.

Hi,

We test onnxsime installation on JetPak 6 and it can work correctly.

$ pip3 install onnxsim
Defaulting to user installation because normal site-packages is not writeable
Collecting onnxsim
  Downloading onnxsim-0.4.36.tar.gz (21.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.0/21.0 MB 1.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting onnx
  Downloading onnx-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 1.1 MB/s eta 0:00:00
Collecting rich
  Downloading rich-13.7.1-py3-none-any.whl (240 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 240.7/240.7 KB 1.1 MB/s eta 0:00:00
Collecting protobuf>=3.20.2
  Downloading protobuf-5.26.1-cp37-abi3-manylinux2014_aarch64.whl (300 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 300.9/300.9 KB 734.9 kB/s eta 0:00:00
Requirement already satisfied: numpy>=1.20 in /usr/lib/python3/dist-packages (from onnx->onnxsim) (1.21.5)
Collecting markdown-it-py>=2.2.0
  Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 KB 948.8 kB/s eta 0:00:00
Collecting pygments<3.0.0,>=2.13.0
  Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 1.3 MB/s eta 0:00:00
Collecting mdurl~=0.1
  Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Building wheels for collected packages: onnxsim
  Building wheel for onnxsim (setup.py) ... done
  Created wheel for onnxsim: filename=onnxsim-0.4.36-cp310-cp310-linux_aarch64.whl size=2021918 sha256=2fd57791fcf751a597c3ef405481d0886464197e80d348e38f6b076e055dcd9b
  Stored in directory: /home/nvidia/.cache/pip/wheels/51/a9/c1/cbe7d070e6fa8da6040770c3f71353ff5dc586bdb128546685
Successfully built onnxsim
Installing collected packages: pygments, protobuf, mdurl, onnx, markdown-it-py, rich, onnxsim
  WARNING: The script pygmentize is installed in '/home/nvidia/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts backend-test-tools, check-model and check-node are installed in '/home/nvidia/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script markdown-it is installed in '/home/nvidia/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script onnxsim is installed in '/home/nvidia/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed markdown-it-py-3.0.0 mdurl-0.1.2 onnx-1.16.0 onnxsim-0.4.36 protobuf-5.26.1 pygments-2.17.2 rich-13.7.1

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.