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

Docker image for Raspberry Pi #2

Open
salekd opened this issue Mar 15, 2019 · 2 comments
Open

Docker image for Raspberry Pi #2

salekd opened this issue Mar 15, 2019 · 2 comments

Comments

@salekd
Copy link
Owner

salekd commented Mar 15, 2019

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

@salekd
Copy link
Owner Author

salekd commented Mar 15, 2019

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.

@salekd
Copy link
Owner Author

salekd commented Mar 16, 2019

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

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

No branches or pull requests

1 participant