Train the Deep Learning model using Docker Container with automation tool called Jenkins …

Task statement :
→Create a Image using Dockerfile , and then launch the container using the Image... Whenever u launch the container it will run code of training the model …
→Now the developer change/modify anything in his code, then automatically Jenkins pulls the files from GitHub and run Container .. If accuracy is less than required accuracy then Jenkins retrain the model using the same container … If accuracy is good, Jenkins send a mail to user …
Step 1: Created a Docker image using Dockerfile … Here is the Dockerfile using TensorFlow as a base image …

→ To make an image from Dockerfile .. use Command as “ docker build -t dldocker . “ ← It will create a docker image ….

Step 2: If the developer modifies the file, then automatically Jenkins triggered itself and download the files into workspace … Do the things for Jenkins job1 …
→ provide github url …
→ give * * * * * to the Poll SCM ,,, So that it checks everytime the github …
→ cp the files to workspace ..

Step 3: Now create a job2 in Jenkins … We need to deploy the code in the docker container using Docker image dldocker:latest ….
→ In build triggers ,

→ And then , In build section , select execute shell ,,

- cmd “ sudo python3 …….. ” → It will print the accuracy of the model ….
- cmd “ sudo cp …… ” → It will copy the accuracy.txt from container to
- jenkins job2 workspace …. Accuracy.txt file is used for email purpose …
→ In post-build Ssection , select Editable Email notification ….. provide ur email details for sending the accuracy to ur mail ..
Step 3: Its time to check the accuracy of our model .. If it is less than 90 , the model again trained by container … For this , we need some code in Build section …

Done with coding part … Lets go for the outputs….
Job1 Console o/p :

Job2 Console o/p : My model has gained the accuracy of 75% …

Job3 Console o/p : Retrain the model for the second time… Got 91% … Model perfectly trained …

Build pipeline for the entire job ….

Done with task part … Thanks for reading ….
Worked along with Vyshnavi Talla … Thank U sister ….