salekd / rpizero_smart_camera3

Smart security camera with Raspberry Pi Zero and OpenFaaS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker image for Raspberry Pi

salekd opened this issue · comments

Provide an image that can be deployed with OpenFaaS on Raspberry Pi.

After a couple of hours on Raspberry Pi 3 B+, I got the image based on the python3 template, with tensorflow installed from https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.13.1/tensorflow-1.13.1-cp35-none-linux_armv7l.whl and protobuf compiled. The image is available here: https://hub.docker.com/r/salekd/faas-mobilenet-rpi

Next steps:

  • Build an image for Raspberry Pi Zero. The same Dockerfile can be used, specify armv6l for tensorflow in requirements.txt
  • Build a reusable base image just with tensorflow and protobuf. This can be then used for various functions from various templates.

After a minor fix, I think the inference is running. The image is here https://hub.docker.com/r/salekd/faas-mobilenet-rpi/

I did the following test. I run
sudo docker run -p 8080:8080 faas-mobilenet-rpi

and see

2019/03/16 21:45:49 Forking fprocess.
2019/03/16 21:46:36 Wrote 4926 Bytes - Duration: 47.342673 seconds

with the curl command below. From the above printout, I conclude the inference is running.

curl localhost:8080 -d "$(echo -n '{"filename": "50-20171111115421-01.jpg", "image_data": "'; base64 50-20171111115421-01.jpg | tr -d '\n'; echo '"}')"

However, I get this message back
curl: (52) Empty reply from server