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
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