This project involves classifying healthy and diseased chicken images using the VGG16 pretrained model. The project uses DVC to track and implement the machine learning pipeline and provides a user app for image classification, which is deployed using Docker and AWS/Azure CI/CD pipelines.
- Update
config.yaml
- Update
secrets.yaml
[Optional] - Update
params.yaml
- Update the entity
- Update the configuration manager in
src/config
- Update the components
- Update the pipeline
- Update
main.py
- Update
dvc.yaml
-
Clone the Repository
git clone https://github.com/entbappy/Chicken-Disease-Classification--Project cd Chicken-Disease-Classification--Project
-
Create a Conda Environment
conda create -n cnncls python=3.8 -y conda activate cnncls
-
Install the Requirements
pip install -r requirements.txt
-
Run the Application
python app.py
-
Open Your Local Host and Port
- Initialize DVC
dvc init
- Reproduce the Pipeline
dvc repro
- Visualize the DVC DAG
dvc dag
-
Login to AWS Console
-
Create IAM User for Deployment with the following access:
- EC2 access: Virtual machine
- ECR: Elastic Container Registry to save your Docker image in AWS
-
Build Docker Image of the Source Code
-
Push Your Docker Image to ECR
-
Launch Your EC2 Instance
-
Pull Your Image from ECR in EC2
-
Launch Your Docker Image in EC2
- AmazonEC2ContainerRegistryFullAccess
- AmazonEC2FullAccess
- Create an ECR repo to store/save the Docker image.
- Save the URI: 566373416292.dkr.ecr.us-east-1.amazonaws.com/chicken
-
Create an EC2 Machine (Ubuntu)
-
Open EC2 and Install Docker
sudo apt-get update -y sudo apt-get upgrade curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker ubuntu newgrp docker
-
Configure EC2 as Self-Hosted Runner
- Go to Settings > Actions > Runners > New self-hosted runner
- Choose OS and run the provided commands one by one.
-
Setup GitHub Secrets
AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_REGION=us-east-1 AWS_ECR_LOGIN_URI=566373416292.dkr.ecr.ap-south-1.amazonaws.com ECR_REPOSITORY_NAME=simple-app
########################################
docker build -t chickenapp.azurecr.io/chicken:latest .
docker login chickenapp.azurecr.io
docker push chickenapp.azurecr.io/chicken:latest
- Build the Docker image of the Source Code
- Push the Docker image to Container Registry
- Launch the Web App Server in Azure
- Pull the Docker image from the container registry to Web App server and run