Trained ML model over Docker

Bhavna Surendra Latare
3 min readMay 31, 2021

Hello Readers!

In this article we are going to discuss about deploying a trained Machine Learning model over Docker — a containerization technology.

Note : The practical is performed on AWS cloud and RHEL is used as base os.

Let’s start…………

Step 1 : Install Docker

Configure yum

Command to check yum is configured or not : yum repolist

check yum is configured or not

Install docker

Command : yum install docker-ce — nobest

Start and enable docker services

To start the service : systemctl start docker

To enable the service : systemctl enable docker

To check the status of the service: systemctl status docker

Step 2 : Pull Docker image

Here, we are pulling centos image and launching the container with name “ML-summer-os”

Command :

docker pull centos:latest

docker run -it — name ML-summer-os centos:latest

Step 3 : Install software required for data analysis

Commands:

yum install python3

pip3 install sklearn pandas

install python3
install sklearn pandas using pip3

Step 4 : Install git

Command: yum install git

install git to clone

Step 5 : Clone the git repository

Command: git clone <repository_link>

Step 6 : Go to the folder and list the files

We are able to see our files created in it. To efficiently run python files convert the .ipynb files to .py files

Step 7 : Run the file Salary_Prediction.py

ML code for training the model
OUTPUT

Thus, we have deployed our model on Docker container.

Do try this practical!!!

Keep Learning!

Keep Sharing!

Stay safe……….

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Bhavna Surendra Latare
Bhavna Surendra Latare

Written by Bhavna Surendra Latare

I am a student passionate about Programming and Development | DSA Enthusiastic | working on ML | exploring Indian Culture

No responses yet

Write a response