Machine Learning on Docker

Rohit Raut
2 min readJun 3, 2021

In this article, we are going to see how we can run a machine learning model in the docker container.

First, we need to create a machine learning model. In this article, we are creating a salary prediction model.

Step1: The first step is to load the dataset

Step2: Split Data into training and testing data.

Step3: Train the model

Step4: To Display Prediction Line/ Best fit line

Step5: Save model for future use for this we are using the joblib module

To run in container.

Step1: Download the image.

docker pull image_name:version 

Step2: Run the container

docker run <options> --name container_name image:version 

Step3: Install python and required library

Step3:copy model to container

Step4: loaf model against with the joblib

Step5: Run the application

congratulation we successfully run the machine learning model in a docker container.

follow me for more interesting articles.

Thank you for reading…

--

--