/mlapi

Containerized data transformations for machine learning

Primary LanguagePython

Data transformation containers

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.

Status: WIP

This is my tinkering around with various technologies. Until I remove the WIP and start tagging commits, everything is probably broken.

Planned stack:

  • 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)

Docker notes:

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).

Build the docker image:
docker build -t mlapi-nginx .
Run the docker image:
docker run -it -p 80:8000 --name mlapi_interact mlapi-nginx /bin/bash
docker run -it -p 80:8000 --name mlapi_deploy mlapi-nginx
Stop and remove all docker images:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
References: