This project uses Docker and Kubernetes to deploy an api to predict housing prices in Boston. In this project, you will apply the skills you have acquired in this course to operationalize a Machine Learning Microservice API.
- Run
make setup
to create a python virtual environment. - Run
source ~/.devops/bin/activate
to activate the virtual environment. - Run
make install
to install the necessary dependencies
- Standalone:
python app.py
- Run in Docker:
./run_docker.sh
- Run in Kubernetes:
./run_kubernetes.sh
- Setup and Configure Docker locally.
- Setup and Configure Kubernetes locally.
- Create Flask app in Container.
- Run via kubectl.
- Make sure the app is running as outlined in Running
app.py
. - Run
./make_prediction.sh
to make a request to the API.s
.circleci/config.yml
: This file contains the CircleCI workflow definitions.model_data/
: This file contains the ML model for the prediction.output_txt_files/
: This directory contains the results of runningrun_docker.sh
andrun_kubernetes.sh
.app.py
: The python web API that uses the ML model to predict housing prices.make_prediction.sh
: A script to make a sample request to the API.Makefile
: A makefile to script common operations.requirements.txt
: A list of Python dependencies used byapp.py
run_docker.sh
: A script that deploys and runs the app using docker.run_kubernetes.sh
: A script that deploys and runs the app using kubernetes.upload_docker.sh
: A script to push the docker image to Dockerhub.