Deploying Machine Learning Model on Docker Container .

Docker is a useful tool working with Machine Learning. Normally We can do the below explained part with the help of Dockerfile that makes more sense, but to explain what actually is happening I used a simple approach.

To get a better understanding , I would be explaining step by step .

Trained a model and saved with a file name marks.pk1

Saving the model.

Transferred the file on my RHEL8 system .

Installed Docker, Pulled an CentOS image from docker hub and Launched a container with detach mode .

Installing Docker
Pulling an image.
Launching a Container.

Copying the model inside the docker Container.

Copying model inside docker container.
Model has been successfully copied .

Going inside the docker Container and Installing python inside that Container.

Going inside the docker Container.
Installing python3.

Installing joblib and scikit-learn library .

Installing joblib library
Installing scikit-learn library

Loading the model, Now We can see Machine learning model has been successfully running on top of the docker Container.

Open for any queries and suggestions.





Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store