-
Notifications
You must be signed in to change notification settings - Fork 9
Home
David Salek edited this page Nov 20, 2017
·
34 revisions
https://www.openfaas.com/ https://blog.alexellis.io/first-faas-python-function/
git clone https://github.com/openfaas/faas
docker swarm init
cd faas
./deploy_stack.sh
curl -sSL https://cli.openfaas.com | sudo sh
mkdir -p ~/functions && cd ~/functions
faas-cli new --lang python hello-python
faas-cli build -f ./hello-python.yml
docker images | grep hello-python
faas-cli deploy -f ./hello-python.yml
faas-cli list
curl localhost:8080/function/hello-python -d "it's David here"
echo "it's David here" | faas-cli invoke hello-python
https://stackoverflow.com/questions/26070547/decoding-base64-from-post-to-use-in-pil
docker build -t tf-test .
https://blog.alexellis.io/quickstart-openfaas-cli/
https://github.com/faas-and-furious/inception-function
https://forums.docker.com/t/docker-17-03-on-raspberry-pi-zero-w/33027/2
(echo -n '{"image": "'; base64 ~/Desktop/cam.jpg; echo '"}')
(echo -n '{"image": "'; base64 ~/Pictures/1.jpg; echo '"}') |
curl -H "Content-Type: application/json" -d @- http://some/url/
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
docker run -it ubuntu:16.04 /bin/bash
apt-get update
apt-get install git
git clone https://github.com/salekd/rpizero_smart_camera3.git
git clone https://github.com/tensorflow/models.git
apt-get install wget
wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_11_06_2017.tar.gz
tar -zxvf ssd_mobilenet_v1_coco_11_06_2017.tar.gz
apt-get install vim
apt-get install python-pip python-dev build-essential
pip install tensorflow
pip install Pillow
apt-get install -y protobuf-compiler
cd /models/research/
protoc object_detection/protos/*.proto --python_out=.
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
apt-get install python-tk
cd /rpizero_smart_camera/
python object_detection_test.py
https://stedolan.github.io/jq/
apt-get install jq
python object_detection_test.py | jq '.[] | select(.score > 0.5)'
https://github.com/openfaas/faas/blob/master/guide/asynchronous.md