Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ONNX Runtime to ML Images #12

Merged
merged 5 commits into from
Dec 6, 2024
Merged

Add ONNX Runtime to ML Images #12

merged 5 commits into from
Dec 6, 2024

Conversation

lreiher
Copy link
Member

@lreiher lreiher commented Nov 25, 2024

Installs ONNX Runtime with CUDA/TensorRT execution providers (onnxruntime-gpu; see here) to -ml images. Closes #11.

For now, only amd64 is supported. For arm64, installation from Jetson Zoo (JP6.0, Python3.10, Humble base image) led to an import error:

>>> import onnxruntime

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.3 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "<stdin>", line 1, in <module>
  File "/home/dockeruser/.local/lib/python3.10/site-packages/onnxruntime/__init__.py", line 23, in <module>
    from onnxruntime.capi._pybind_state import ExecutionMode  # noqa: F401
  File "/home/dockeruser/.local/lib/python3.10/site-packages/onnxruntime/capi/_pybind_state.py", line 32, in <module>
    from .onnxruntime_pybind11_state import *  # noqa
Traceback (most recent call last):
  File "/home/dockeruser/.local/lib/python3.10/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__
    raise ImportError(msg)
ImportError: 
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.3 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dockeruser/.local/lib/python3.10/site-packages/onnxruntime/__init__.py", line 57, in <module>
    raise import_capi_exception
  File "/home/dockeruser/.local/lib/python3.10/site-packages/onnxruntime/__init__.py", line 23, in <module>
    from onnxruntime.capi._pybind_state import ExecutionMode  # noqa: F401
  File "/home/dockeruser/.local/lib/python3.10/site-packages/onnxruntime/capi/_pybind_state.py", line 32, in <module>
    from .onnxruntime_pybind11_state import *  # noqa
ImportError

@lreiher lreiher requested a review from jpbusch November 25, 2024 09:46
README.md Outdated Show resolved Hide resolved
@lreiher lreiher mentioned this pull request Nov 25, 2024
Dockerfile Outdated Show resolved Hide resolved
.gitlab-ci/os/.ubuntu22.yml Outdated Show resolved Hide resolved
@lreiher lreiher merged commit 4488890 into main Dec 6, 2024
@lreiher lreiher deleted the onnxrt branch December 6, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ONNX Runtime?
2 participants