The objective of this project is to operationalize a Machine Learning Microservice API.
Given a pre-trained, sklearn
model that has been trained to predict housing prices in Boston according to several features, such as average rooms in a home and data about highway access, teacher-to-pupil ratios, and so on, This project operationalizes it so that it in a Python flask app so that it serves out predictions through API calls.
You can find the following files in this repository:
Makefile
: Defines a set of takes to be executed to install, lint, and test the projectapp.py
: contains the code that makes predictions based on inputDockerfile
: builds a docker container*.sh
: utilty scripts to run the project on docker/kubernetes, make predictions,ud or upload images to Docker
- Create and activate a virtual environment
python3 -m venv <your_venv>
source <your_venv>/bin/activate
- Run
make install
to install the necessary dependencies
- Standalone:
python app.py
- Docker:
bash run_docker.sh
- Kubernetes:
bash run_kubernetes.sh
-
To run this project, make sure you install:
-
Docker
-
Hadolint
-
Kubernetes (Minikube)