Please enable Javascript for better experience...
Deep Learning Model Using Docker Container and Jenkins
By Keshav Khatore | Jul 24, 2020 | In Articles | Total Views [ 1312 ]
Taged In
(0 Like)

The method is quite simple

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 any thing in his code , the automatically jenkins pull the files from github and run Container .. If accuracy is less then required accuracy then jenkins retrain the model using same container … If accuracy is gud, 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 a image from Dockerfile .. use Command as “ docker build -t dldocker . “ ←It will create a docker image

Step 2: If developer modify 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 4: 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

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

Thanks for visiting here. Share this article if you found it useful.
Like Facebook Page
Connect to twitter
Subscribe my Channel
Connect over Linkedin
Share this on Social Media

About the Author

Keshav Khatore
Keshav Khatore

Public profile: user/profile/99905478

Follow me

facebook linkedin twitter G+ VMTN youtube

I am Keshav Khatore student of Lovely Professional University, Phagwara, Punjab, India, currently pursuing Masters In Computer Application.I am a Member of Redhat Linux, the biggest network on the planet and it's a glad thing for me to be a piece of such extraordinary and lofty community. I expert in Linux and have certification Red-hat Certified System Administration . For Contact- || LinkedIn-

Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Facebook Likes