Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tristcoil/udacity_devops_machine_learning_microservice
runs dockerized machine learning API
https://github.com/tristcoil/udacity_devops_machine_learning_microservice
Last synced: 28 days ago
JSON representation
runs dockerized machine learning API
- Host: GitHub
- URL: https://github.com/tristcoil/udacity_devops_machine_learning_microservice
- Owner: tristcoil
- Created: 2020-11-12T17:14:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-12T19:17:40.000Z (about 4 years ago)
- Last Synced: 2024-10-14T07:50:43.244Z (2 months ago)
- Language: Python
- Size: 213 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CircleCI](https://circleci.com/gh/tristcoil/Udacity_DevOps_machine_learning_microservice.svg?style=svg)](https://circleci.com/gh/tristcoil/Udacity_DevOps_machine_learning_microservice)
## Project Overview
In this project, you will apply the skills you have acquired in this course to operationalize a Machine Learning Microservice API.
You are 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. You can read more about the data, which was initially taken from Kaggle, on [the data source site](https://www.kaggle.com/c/boston-housing). This project tests your ability to operationalize a Python flask app—in a provided file, `app.py`—that 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.
### Project Tasks
Your project goal is to operationalize this working, machine learning microservice using [kubernetes](https://kubernetes.io/), which is an open-source system for automating the management of containerized applications. In this project you will:
* Test your project code using linting
* Complete a Dockerfile to containerize this application
* Deploy your containerized application using Docker and make a prediction
* Improve the log statements in the source code for this application
* Configure Kubernetes and create a Kubernetes cluster
* Deploy a container using Kubernetes and make a prediction
* Upload a complete Github repo with CircleCI to indicate that your code has been testedYou can find a detailed [project rubric, here](https://review.udacity.com/#!/rubrics/2576/view).
**The final implementation of the project will showcase your abilities to operationalize production microservices.**
---
## Setup the Environment
* Create a virtualenv and activate it
* Run `make install` to install the necessary dependencies### Running `app.py`
1. Standalone: `python app.py`
2. Run in Docker: `./run_docker.sh`
3. Run in Kubernetes: `./run_kubernetes.sh`### Kubernetes Steps
* Setup and Configure Docker locally
* Setup and Configure Kubernetes locally
* Create Flask app in Container
* Run via kubectl## Sources:
#### original udacity project repo:
- git clone https://github.com/udacity/DevOps_Microservices.git#### install docker:
- https://docs.docker.com/engine/install/ubuntu/
- https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket#### installing minikube:
- https://minikube.sigs.k8s.io/docs/start/#### hadolint:
- https://github.com/hadolint/hadolint/
- https://www.haskell.org/platform/#linux-ubuntu
- https://stackoverflow.com/questions/62369711/how-to-install-hadolint-on-ubuntu#### Docker commands:
- https://docs.docker.com/engine/reference/commandline/image_rm/
- https://docs.docker.com/engine/reference/commandline/image_push/
- https://docs.docker.com/docker-hub/repos/
- https://docs.docker.com/engine/reference/commandline/login/#### Kubernetes:
- https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive/
- https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-interactive/
- https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-interactive/#### knowledge base:
- https://knowledge.udacity.com/questions/303115
- https://knowledge.udacity.com/questions/329275
- https://knowledge.udacity.com/questions/351451
- https://knowledge.udacity.com/questions/332693
- https://knowledge.udacity.com/questions/330414
- https://knowledge.udacity.com/questions/321217#### circleci:
- https://s3.amazonaws.com/video.udacity-data.com/topher/2019/May/5cda0d76_config/config.yml
- https://circleci.com/docs/2.0/status-badges/#### git
- used commands generated by github.com when creating new repository#### fixing circleci yaml error:
- https://stackoverflow.com/questions/32441291/unknown-could-not-find-expected-while-scanning-a-simple-key-at-line-3-c- https://codebeautify.org/yaml-validator
- https://circleci.com/docs/2.0/language-python/
- https://en.it1352.com/article/d00d2697f0994df79fcb8bd1ad3167c9.html- https://stackoverflow.com/questions/16482875/you-cannot-define-a-mapping-item-when-in-a-sequence-when-running-phpunit-in-sy
- https://en.it1352.com/article/d00d2697f0994df79fcb8bd1ad3167c9.html- https://discuss.circleci.com/t/incorrect-validation-of-config-yml/22793
- https://github.com/circleci/local-cli/issues/21
- https://github.com/CircleCI-Public/circleci-cli/issues/326
- http://pylint.pycqa.org/en/latest/#note-for-windows-users
- https://stackoverflow.com/questions/55478876/circleci-cannot-find-a-definition-for-job-named-publish-latest
- https://github.com/CircleCI-Public/circleci-cli/issues/11