Simple example that uses Falcon to create a deep learning RESTful prediction service (simple convnet trained on the MNIST dataset). Locust is used for load testing. Gunicorn as WSGI HTTP Server and nginx as HTTP proxy server.
This repository is no longer maintained and has been archived on January, 7th, 2025.
docker build -t falcon-prediction-app .
docker run -p 127.0.0.1:8000:8081 falcon-prediction-app
(echo -n '{"image": "'; base64 src/tests/data/four_test.png; echo '"}') |
curl -i -H "Content-Type: application/json" -d @- http://127.0.0.1:8000/predict
pytest -s src/tests/
locust -f load_testing.py --host=http://127.0.0.1:8000
Note: Access the Locust GUI via http://localhost:8089/
to start load testing.
- Python conda environment (install with
conda env create --file environment.yml
) - Gunicorn
- Falcon
- Keras
- Tensorflow
- Pillow
- Locust
See LICENSE for details.