Open dzianisv opened 7 months ago
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).
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?
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.
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.
Describe the documentation issue
Documentation https://github.com/microsoft/onnxruntime/blob/main/dockerfiles/README.md says the following
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