Containerizing Machine Learning

 Containerizing Machine Learning



Docker :-

Docker is an open platform for developing, shipping, and running applications. Docker, an open source project was launched in 2013.

Its primary focus is to automate the deployment of applications inside software containers and the automation of operating system level virtualization on Linux. It's more lightweight than standard Containers and boots up in seconds.

  • The crucial advantage of Docker is that it is agile.
  • It has Consistent and Isolated Environment.
  • It has cost effectiveness and fast deployement
Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

Steps to be done:-

 1)Pull the Docker container image of CentOS image from DockerHub and create a new container

2)Create a container using docker you can also name this container.

3)Now we will install python libraries that we need in our program
for that we will use following commands
"pip3 install pandas"
"pip3 install numpy"
"pip3 install scikit-learn"





4)Now we will copy our file by using WinSCP software in our os



5)Now we will copy the whole file in container using below command

docker cp <src-path> <container>:<dest-path> ...



6) Now create a python file inside container where we will write our program
here my python file is machinelearning.py





7)This is our machine learning code

8)Now use python3 file_name to implement your model

 


and we are done!!

Thank you











Comments