The project is flask API application to provide predict housing prices in Boston which model has been trained based on the data source site.
# Setup virtualenv
make setup
source ~/.devops/activate
# Install dependencies
make install
# Execute Lint
make lint
- Standalone:
python app.py
- Run in Docker:
./run_docker.sh
- Run in Kubernetes:
./run_kubernetes.sh
Then, Send post request ./make_prediction.sh
.
# Upload a docker image
docker login
./upload_docker.sh
- Setup and Configure Docker locally
- Setup and Configure Kubernetes locally
- Create Flask app in Container
- Run via kubectl
.
├── app.py # Flask app
├── Dockerfile
├── Makefile
├── make_prediction.sh # a script to send POST data
├── model_data # a directory for a model
├── output_txt_files # outputs of logging
├── README.md
├── requirements.txt
├── run_docker.sh # a script to run flask app as docker container
├── run_kubernetes.sh # a script to run flask app as kubernetes cluster
└── upload_docker.sh # a script to push docker images to a repository