Giter Site home page Giter Site logo

tamerthamoqa / cdnd-capstone-project Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 17.57 MB

This is a repository for the fifth and final project in the AWS Cloud DevOps Engineer Udacity Nanodegree (Capstone Project). Deploys a Deep Learning API Microservice using the Amazon Elastic Kubernetes Service on GPU virtual machines. The deployed containers would automatically utilize the available GPU resources.

Python 40.10% HTML 24.91% Dockerfile 12.58% Shell 22.41%
docker aws kubernetes eksctl python pytorch nvidia-gpu nvidia-cuda-gpu gpu deep-learning

cdnd-capstone-project's Introduction

CDND-Capstone-Project

This is a repository for the fifth and final project in the AWS Cloud DevOps Engineer Udacity Nanodegree (Capstone Project). The project would deploy a Deep Learning API Microservice to classify input images according to the ImageNet dataset classes.

The objective of the project is as follows:

  • Build a web application that serves a pre-trained PyTorch MobileNet-V2 ImageNet Classifier Deep Learning model via a Python Flask application in a Waitress production WSGI server.
  • Set up a Docker image that contains the web application and required dependencies which can also load the model to an NVIDIA CUDA GPU if available for faster inference.
  • Deploy the Docker image on a Kubernetes cluster using the AWS Elastic Kubernetes Service with the eksctl command line toolkit while leveraging a Jenkins CI/CD Pipeline.
  • The Kubernetes cluster would contain two pods with one container each of the Docker image deployed on AWS EC2 t3.large instance nodes with the following Cluster AutoScaler setting: (minimum: one node, desired: two nodes, maximum: two nodes).
  • The Kubernetes cluster would be updated via a Rolling Update strategy.

ย 

  • Post-Submission: Changed the Kubernetes cluster configuration to deploy eight pods with one container each of the Docker image deployed on AWS EC2 g4dn.xlarge instance nodes that utilize the Tesla T4 GPU for accelerated machine learning and deep learning inference workloads with the same Cluster Autoscaling setting as before such that the containers would utilize the available GPU resources.

GPU utilization screenshot

Requirements

Note: Links to useful resources I have found while doing the project are in the 'useful_resources.txt' file in 'project_instructions'.

Project Files

  • server.py: The web application server.
  • model: Pre-trained ImageNet MobileNet-V2 PyTorch model.
  • templates: Contains the required HTML file.
  • requirements.txt: Required Python packages to run the application.
  • hadolint: Hadolint v1.18.0 Linux-86_64 executable.
  • Jenkinsfile: Defines the Jenkins CI/CD stage pipeline to run on a Jenkins server.
  • Dockerfile: Defines the Docker image.
  • docker_build.sh: Builds the Docker image.
  • docker_upload.sh: Tags and uploads the Docker image to DockerHub.
  • docker_run_cpu.sh: Runs the application locally in a Docker container using the CPU.
  • docker_run_gpu.sh: Runs the application locally in a Docker container using an available NVIDIA CUDA GPU.
  • kubernetes_run_local.sh: Runs the Docker image on a local Kubernetes cluster (e.g: Minikube).
  • kubernetes_deployment.yml: Defines the Kubernetes deployment configuration on the AWS EKS Cluster.
  • eksctl_create_aws_kubernetes_cluster.yml: Creates a Managed AWS EKS Cluster (implicitly using AWS Cloudformation).
  • eksctl_apply_deployment_aws_kubernetes_cluster.yml: Applies the kubernetes_deployment.yml Kubernetes deployment configuration to the created EKS Cluster.
  • eksctl_delete_aws_kubernetes_cluster.yml: Deletes the EKS Cluster and all its resources.

cdnd-capstone-project's People

Contributors

tamerthamoqa avatar

Stargazers

 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.