This is a project which would automate everything after developer commits code in GIT
Prerequities: GIT , Docker and Jenkins should be pre-installed on the top of Base system RHEL8
To deploy the project
- Create a file named "Dockerfile" and copy paste from Dockerfile then save.
- Run the command same as
docker build -t mlops:latest .
- In GIT bash go to Your
project_folder/.git/hooks//
- Create post-commit file and copy paste data from
post-commit
- Now in jenkins create job1 and write
cp -v -r -f * /myweb
in Execute shell.
set triggers for SCM pooling and save - Create job2 and copy paste the code
if sudo python3 /myenv/checking.py == CNN model
then
if sudo docker ps -a | grep testing
then
sudo docker rm -f testing
sudo docker run -v /myweb:/MLops --name testing mlops:latest
else
echo "Image not present"
fi
fi
set triggers to build after job1 - Create job3 and copy paste the code
sudo python3 /myenv/mail.py
set triggers to builtd after job2 - Setup job4 as pipeline for all 3 jobs using Build pipeline as a monitoring system.
- Job1 : Download the code and store it in
/myenv
folder. - Job2 : Check the code and accordingly launch the container for model training. Also it check the accuracy of the model and if
acc < 0.95
it retrains the model after changing the architecture of the model. After the training the model it stores the accuracy of the model to/MLops/accuracy.txt
file. - Job3 : After getting best accuracy it notify to the developer for accuracy via E-mail.
- Job4 : Monitoring system for all 3 jobs using Build pipeline.