Deploying Machine Learning code on Docker Technology

Atul Nikade
3 min readMay 29, 2021

--

what is docker

docker is a containerization technology that helps to deploy the various applications

Deploying python code on docker

Steps To Deploy Machine Learning Code On Docker

install docker on the top of RHEL8

Command To Install Docker ‘ yum install docker-ce ’

Pull The Docker Container Image Of Centos Image From DockerHub

Command to Pull The Image From DockerHub ‘ docker pull centos:latest’

//latest is use to consider by default updated version //

Launch One Container

Command To Launch The Container ‘docker run -it — name TASK1 centos:latest’

Install The Python Software On the Top of The Container Created i.e TASK1

Command to Install The Python Software ‘yum install python3’

Installing Required Libraries To Run The Program

Command To Install The Library is ‘pip3 install pandas’ ‘pip3 install numpy’

From The Base Red Hat Operating System Copy The Mchine Learning Code To The Container.

Command To Copy The Code is ‘docker cp task1 TASK1:task1.py

Copy The Data File From Base Red Hat Operating System To Container

Copied Source Code

Output

That’s It. Thank You Hope This Article is Useful For You!

For More Articles Connect me On LinkedIn https://www.linkedin.com/in/atulnikade22/

--

--

No responses yet