A simple Flask application in a docker image that can serve predictions from a scikit-learn model inside a Docker container. Reads a pickled sklearn model into memory when the Flask app is started and returns predictions through the /predict endpoint. Any sklearn model can be used for prediction.
- scikit-learn
- Flask
- pandas
- numpy
To build the docker image run:
docker build . -t model
Or run the file: 'create_image.sh'
Run the docker container as:
docker run -p 8080:8080 model:latest
Or run the file: 'docker_run.sh'
Returns a dict with the prediction given a JSON object representing independent variables.
Return the model info, version and help.