Containerization of Machine Learning Model.

What is “Docker”?

  • Docker is an open platforom for developing,shipping,and running applications.Docker enables you to seperate your applications from your infrastruture so you can deliver software quckly.With docker you can manage your infrastructure in the same ways you manage your applications.By taking advantage of Docker’s methodohies for shipping,testing,and deploying code quickly.

Step 1:

Pull the Docker container image of CentOS image from DockerHub.

  • I have pulled the Centos image.
  • Command:docker pull centos
  • Launched the os by giving the name “st2021”.
  • Command: docker run -it — name=st2021 centos

Step 2:

  • Install the Python on the top of docker container.
  • To installed the python software in the CentOS ,I have used following command.
  • Command: yum install python3

Step 3:

  • After installing the python on CentOs ,I have installed all the lmodule that is required.
  • Command: pip3 install module name
  • Ex. pip3 install numpy.

Step 4:

  • After that I have copied the data set file “Salary_Data.csv” that i have already in the redhat .For that firstly I go in my root directory and go into the folder where I saved that file(“Salary_Data.csv”)
  • Command:docker Summer_Program2021/
  • Command:ls
  • Command:docker cp Salary_Data.csv st2021:/

Step 5:

  • In container I create machine learning model which I have created in jupyter notebook.
  • By running these files with python3 I get my expected output.

Thanks For Reading!!!




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Oyster-Card Challenge

Pangolin — how are Liquidity Pools created through smart contracts?

Master Object-Oriented Programming in Python

Watch Live TV On The IPTV Smarters pro With xtream codes API

Watch Live TV On The IPTV Smarters pro With xtream codes API

Genesis Drop sold out — Here’s what comes next!

The Secret World of Newline Characters

OCP — Nginx Configuration & Install

Code Reviews at Zymergen

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

Abhinandan Nahar

More from Medium

The Archer — Paulo Coelho- Review

The Elaboration Likelihood Model

CS371p Spring 2022: Christopher Carrasco — Week 3

Learning From Sommeliers