This repository provides ONNX build dockerfile for Arm32v7l (Raspberry Pi 3).
Currently we support the following conbination of software versions.
- Python 3.7-3/10
- Debian Bullseye/Buster
We provide pre-build docker images below.
You can pull it with the command below.
docker pull mshrh/onnx-raspberry-pi-3
Or you can manually build image from Dockerfile by following instruction.
-
Install DockerCE on your machine by following the instruction
-
Clone this repository
git clone https://github.com/mshr-h/onnx-dockerfile-for-raspberry-pi
cd onnx-dockerfile-for-raspberry-pi
- Move to a folder where you want to build for and run docker build
cd 3.7-bullseye-build # Debian bullseye with Python 3.7
docker build -t onnx-arm32v7 -f Dockerfile.arm32v7 .
-
Note the fullpath of the
.whl
file -
Copy the Python wheel file from the docker image
docker create -ti --name onnx_temp onnx-arm32v7 bash
docker cp onnx_temp:/code/onnx/dist/onnx-1.6.0-cp35-cp35m-linux_armv7l.whl .
docker rm -fv onnx_temp
-
Copy wheel file(
onnx-1.6.0-cp35-cp35m-linux_armv7l.whl
) to the Raspberry Pi 3 or other ARM device -
Install the ONNX wheel file
sudo apt update
sudo apt install -y python3 python3-pip
pip install onnx-1.6.0-cp35-cp35m-linux_armv7l.whl