The goal of this project is to productionize Python data transformations as dockerized REST microservices. The data transformations within each container can be anything from data munging to unsupervised/supervised machine learning models/ensemblers. I am currently exploring this project from the top of the stack going downward simply because that is where I am currently getting the most return on learnings per unit time.
This is my tinkering around with various technologies. Until I remove the WIP and start tagging commits, everything is probably broken.
- Docker
- nginx (based on a ~135mb Debian image)
- gunicorn
- supervisor
- conda
- Flask-RESTful tutorial here
- Postgres (via SQL-Alchemy)
- scikit-learn, xgboost (predictive modeling)
- Seaborn (data visualization)
I decided to start from the official nginx docker image because nginx is at the top of my stack (I'm not sure if that is a good reason).
docker build -t mlapi-nginx .
docker run -it -p 80:8000 --name mlapi_interact mlapi-nginx /bin/bash
docker run -it -p 80:8000 --name mlapi_deploy mlapi-nginx
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)