Code Monkey home page Code Monkey logo

devops-for-ml's Introduction

DevOps-for-ML

Architecture

Architecture

Code Files:

CI_and_CD/src/inference.py:

• Reading the Input Json data and transform it into prediction sample.

• Load the Pickled Model file and predict for Input data

• Jsonify the predictions and return the response.

• Wrap this Model Prediction code in a Flask API and expose the endpoint.

Dockerfile: Our Flask API will run inside this Docker Container.

• Using Base Image as continuumio/anaconda3:4.4.0

• Install required Ubuntu packages

• Set the Working Directory

• Copy the required Code Files.

• Install the dependent python Packages.

• Run the Flask API to serve the Model

Jenkinsfile: Contains Code to build Docker Image and run Docker Container to server Model as an API.

• Pretty much the steps explained below in ML Prediction Pipeline Steps.

Whenever developer checks-in code to github and pull request is approved to merge code to Master branch then the Jenkins ML Prediction Pipeline will be triggered.

Prerequisites for ML Prediction Pipeline:

• Create Web Hook in Github to Trigger the Jenkins Pipeline Job

Go to Project/Settings/Webhooks in Github
Refer the Screen shot below

Github WebHook

• Configure the Pipeline to trigger on Github's request.

select option as shown in below screenshot.

Jenkins WebHook

ML Prediction Pipeline Steps:

  1. Clean the workspace.

  2. Pull the ML Prediction code to Jenkins Workspace from Github.

  3. Build the Docker image using the Dockerfile.

  4. Tag the local Docker Image to Docker Hub Repository (I Choose to have Jenkins Build Number as Docker Repository Image Tag).

  5. Push the local Docker Image to Docker Hub Repository.

  6. Using SSH execute the below commands in Prod/QA server.

    (a) Pull the ML Prediction Docker Image from Docker Hub.

    (b) Run the Docker Container in Prod/QA server attaching the created volume which contains the ML Model.

devops-for-ml's People

Contributors

kalikichandu avatar

Watchers

 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.