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.
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
- 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
- After installing the python on CentOs ,I have installed all the lmodule that is required.
- Command: pip3 install module name
- Ex. pip3 install numpy.
- 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:docker cp Salary_Data.csv st2021:/
- 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!!!