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

[Documentation] build on arm32v7 #19224

Open
dzianisv opened this issue Jan 22, 2024 · 4 comments
Open

[Documentation] build on arm32v7 #19224

dzianisv opened this issue Jan 22, 2024 · 4 comments
Labels
documentation improvements or additions to documentation; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@dzianisv
Copy link

Describe the documentation issue

Documentation https://github.com/microsoft/onnxruntime/blob/main/dockerfiles/README.md says the following

For ARM32, please use Dockerfile.arm32v7 instead of Dockerfile.arm64.

But there is no Dockerfile.armv32v7 at https://github.com/microsoft/onnxruntime/blob/main/dockerfiles anymore. Where I can find it?

Page / URL

https://github.com/microsoft/onnxruntime/blob/main/dockerfiles/README.md

@dzianisv dzianisv added the documentation improvements or additions to documentation; typically submitted using template label Jan 22, 2024
@snnn
Copy link
Member

snnn commented Jan 22, 2024

Use cross-compiling. https://onnxruntime.ai/ has the detailed instructions. You may also check https://github.com/microsoft/onnxruntime/blob/main/tools/ci_build/github/azure-pipelines/linux-ci-pipeline.yml#L180-L187 for how it works in our CI .
Then after cross-compiling the *.so files, you will still need an ARM32 device(or virtual machine) to assembly the final python wheel file by running setup.py on that device(or VM).

@dzianisv
Copy link
Author

Looks like

          cmake $(Build.SourcesDirectory)/cmake -Donnxruntime_ENABLE_CPUINFO=OFF -DPython_EXECUTABLE=/usr/bin/python3 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=$(Build.SourcesDirectory)/cmake/linux_arm32_crosscompile_toolchain.cmake -G Ninja
          ninja

builds a shared library, but how I can built a final wheel using for instance docker buildx for armv7 target?

@snnn
Copy link
Member

snnn commented Jan 22, 2024

I doubt docker can serve the needs well. Last time when I ran an arm32 docker image inside a non-arm32 Ubuntu Linux, the docker instance couldn't report report CPU arch correctly. For example, the output of "uname -m" was wrong.
Back to your question, our document at https://onnxruntime.ai/docs/build/inferencing.html has instructions on how to setup a sysroot for cross-compiling . You need to have that. Then add "--enable_pybind" to the build command.

Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation improvements or additions to documentation; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

2 participants