Giter Club home page Giter Club logo

ml-microservice-kubernetes's Introduction

Design by Joseph Akayesi. Photo by Katarzyna Pe




josephakayesi

Project Summary

This project deploys a Machine Learning Microservice API using Docker and Kubernetes. The Machine Learning Model is exposed by a python flask app via Web API. The model is 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.

Files Overview

  1. .circleci: It holds all CICD configurations for CircleCI build server.
  2. model_data: It holds the prediction model library and the prediction model data used to train the model.
  3. output_txt_files: It holds the output logs for the deployed and running application for both docker and kubernetes.
  4. app.py: The index file for starting the python flask application server.
  5. Dockerfile: Docker configurations for building and running the docker image based of the project.
  6. requirements.txt: The package dependencies for the python flask application.
  7. run_docker.sh: Script to build and run docker image.
  8. run_kubernetes.sh: Script to run docker image using kubernetes.
  9. upload_docker.sh: Script to upload docker image to dockerhub.

Setup the Environment

  • Create a virtualenv with Python 3.7 and activate it. Refer to this link for help on specifying the Python version in the virtualenv.
python3 -m pip install --user virtualenv
# You should have Python 3.7 available in your host. 
# Check the Python path using `which python3`
# Use a command similar to this one:
python3 -m virtualenv --python=<path-to-Python3.7> .devops
source .devops/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

ml-microservice-kubernetes's People

Contributors

josephakayesi avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Forkers

vikkybass1

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.