Giter Site home page Giter Site logo

sourabhgupta385 / operationalize-ml-microservice-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 3.0 1.08 MB

This is one of the project in Udacity Cloud DevOps Engineer Nanodegree.

Dockerfile 9.16% Makefile 20.40% Python 39.50% Shell 30.95%
udacity udacity-nanodegree udacity-devops-nanodegree udacity-cloud-devops-nanodegree udacity-nanodegree-project kubernetes docker containerization python-flask predictions

operationalize-ml-microservice-api's Introduction

CircleCI

Project Overview

Operationalize a Python flask app—in a provided file, app.py—that serves out predictions (inference) about housing prices through API calls. Main aim of the project is to containerize the python flask-app and deploy the container in Kubernetes cluster. This project could be extended to any pre-trained machine learning model, such as those for image recognition and data labeling.

Project Tasks

  • Test project code using linting
  • Complete a Dockerfile to containerize this application
  • Deploy 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

Setup the Environment

  • Create a virtualenv and activate it
python3 -m venv <your_venv>
source <your_venv>/bin/activate
  • 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

Files

  • output_txt_files/docker_out.txt contains logs returned after running the app with Docker
  • output_txt_files/kubernetes_out.txt containes logs and the prediction returned after running the app with Kubernetes(run_kubernetes.sh)
  • run_docker.sh contains the steps to get Docker running the app locally
  • run_kubernetes.sh contains the steps to get Kubernetes running the app locally
  • upload_docker.sh contains the steps to upload the image to the Docker repository

operationalize-ml-microservice-api's People

Contributors

sourabhgupta385 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.