This project contains a machine learning model that has been trained to predict housing prices in Boston according to several features and it shows how to operationalize a Python flask app—in serves out predictions (inference) about housing prices through API calls.
This project could be extended to any pre-trained machine learning model, such as those for image recognition and data labeling.
- Setup the environment pre requisites:
-
On your bash console run
make
make install
-
Standalone:
python app.py
-
Run in Docker:
./run_docker.sh
-
Run in Kubernetes:
minikube start
./run_kubernetes.sh
-
Makefile
A Makefile which defines the set of tasks to be executed for this project installation. -
Dockerfile
Docker container definition for running the house price predictor service. -
requirements.txt
Python libraries dependencies. -
Bash Scripts
-
create_localenv.sh
: setup a python virtual enviroment and install hadolint -
make_prediction.sh
: runs a post request to teest the predictor service. -
run_docker.sh
: docker commands to build and run the predictor stand alone container -
run_kuberenets.sh
: kubectl commands to set-up and run the kubernetes predictor service -
upload_docker.sh
: upload the container image to Docker Hub account.
-
- You can read more about the data, which was initially taken from Kaggle, on the data source site.