Skip to content

spanner4715/Create-Scalable-CD-CI-pipeline-to-deploy-ML-model--by-using-Azure-Devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Scalable CD/CI pipeline to deploy ML model by using Azure Devops

Objective

Most of the time, the machine learning models are trained and developed in local Python notebook and the codes are provided to an app developer, who have to integrate it into an application and deploy it. It's common to see the bugs and the performance issue happened without noticing until the code has already been deployed.
To tackle this problem, building Machine learning apps through Azure DevOps could be a good option. The whole process becomes a part of the Continuous Integration (CI) and Continuous Delivery (CD) pipeline of the Azure DevOps. Users can continue to write and train models in their favorite Python environment and deployed the model to production without worrying about any conflicts between the app and the model.

DevOps: Development and Operations

  1. Continuous Integration and Continuous Delivery (CI/CD)
  2. Real-time monitoring
  3. Collaborated platforms
  4. Cloud agility
  5. Orchestration

Azure Repos

  1. A software to keep tracking changing of codes
  2. Two version control tools: Git and TFVC

Clone Azure Repos through VScode

  1. Create a project in Azure DevOps image
  2. Then create a repository, click "Clone in VS code" image
  3. Select a repository location and put the file into this folder, files will then be displayed on VScode image
  4. Files will be uploaded to Azure simultaneously image

Define FastAPI

FastAPI is a fast, high-performance web framework for building API with Python. image

Utilize of Docker

Docker is an open platform for developing, shipping and running applications. Its containers are specialized for (CD/CI) workflow. Docker image is a read-only template with instructions for creating containers. image

Define Docker file

Creating a dockerfile, put its syntax to define the necessary steps to create docker image and run it. image

Create Azure Resource Group

Create a resource group which contains every related resources for Azure solution image

Create Azure Container Registry

The Azure container registry is a hosting platform for Docker images and a fast, scalable retrieval of container workloads. The benefits of Azure container registry includes "Manage images for different types of containers", "Automated container building, testing and scanning", "Manage windows and Linux container images in a single registry"

  1. Go to resource group and choose "Container Registry" image

Build Azure Pipeline

Features of Azure pipeline: 1. Automatically builds and tests code projects 2. CI/CD operations 3. Continuous testing CI: Continuous Integration is the practice used by development teams of automating merging and testing code CD: Continuous Delivery is a process by which code is built, tested and deployed to one or more test and production environments There are two methods to build Azure pipeline

  1. Define Pipeline through Yaml file image
  2. Define Pipeline through Azure DevOps web portal with classic user interface image

Configuring pipeline by yaml

Features of Yaml: 1. Data serializtion language that is used for writing configuration files 2. The structure of Yaml file is a map or list image File is ready image

Customize Yaml pipeline

Features of creating Yaml pipeline 1. Change the platform 2. Add steps 3. Build multiple platforms 4. Customize CI trigger Ex. Make pipeline on 3 different platforms image

Deploy image to Azure Web APP

Features of Azure web app: 1. Deploy a scalable web applications 2. Deploy image 3. CI/CD integration with GitHub, Docker Hub, Azure Pipelines, Azure Container Registry Create Web App image After setting, select URL image Model result would be displayed image

About

Create a CI/CD pipeline of the Azure DevOps, enables Machine learning app runs faster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published