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.

Prasantmahato
2 min readMay 27, 2021

--

Let’s Start,

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

Step1

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

Saving the model.

Step2

Transferred the file on my RHEL8 system .

Step3

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

Installing Docker
Pulling an image.
Launching a Container.

Step4

Copying the model inside the docker Container.

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

Step5

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

Going inside the docker Container.
Installing python3.

Step6

Installing joblib and scikit-learn library .

Installing joblib library
Installing scikit-learn library

Step7

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.

Thankyou

--

--