Task 01
Task Description
π Pull the Docker container image of CentOS image from DockerHub and create a new container
π Install the Python software on the top of docker container
π In Container you need to copy/create machine learning model which you have created in jupyter notebook
What is docker ?
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
Pulling Centos image
docker pull centos
Running container
docker run -it --name mytestingos centos
Installing pip
yum install python3-pip -y
Installing libraries
pip3 install scikit-learn pandas
Copying code
docker cp /root/Documents/ml.py mytestingos:/
docker cp /root/Documents/SalaryData.csv mytestingos:/
#docker cp command is used to copy data#
Running code
python3 ml.py
Saving container as the new image
docker commit mytestingos myMLimage