The project's goal is to operationalize a machine learning microservice using kubernetes. 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. The service serves out predictions (inference) about housing prices through API calls. The model 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.
- Create a virtualenv and activate it
- python3 -m venv ~/.devops
- source ~/.devops/bin/activate
- make install
- make lint
- Standalone:
python app.py
- Run in Docker:
./run_docker.sh
- Run in Kubernetes:
./run_kubernetes.sh
- Setup and Configure Docker locally
- curl -fsSL https://get.docker.com -o get-docker.sh
- bash get-docker.sh
Setup and Configure Kubernetes locally
- curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
- sudo dpkg -i minikube_latest_amd64.deb
- minikube start
- Create Flask app in Container
- minikube kubectl run project-ml -- --image=vprocopan/project-ml:v1 --port=80
- minikube kubectl port-forward project-ml 8000:80