Hello Guys 🙋♀️ In this article we are going to perform the following task.
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
Let’s start the practical…….
First, we need to install docker on our local system
Now start Docker Services by using the following command:
sysytemctl start docker
let's check Docker Status
sysytemctl status docker
Now we are going to pull the image by using the following command
Let's launch docker container now…….
Here I created a container named ML and also created a directory.
We can check our container by using docker ps command
Now we need to install python and some libraries of python.
When we want to load data and want to retrieve a row or column then we can use NumPy but it is recommended to use Pandas. We are using pandas to load csv file.
We are going to use various functions from this library.
Create a program for the Machine Learning model in your local system. and transfer the csv file using WINSCP into your local system(Linux).
vim exp.py
This is our program for predicting the salary of a person based on their experience.
Now we need to copy this code and csv file in our ML container.
By using the ls command you can check whether it is copied successfully or not.
Let's run our program…….
python3 exp.py
Now you can see it's working successfully and providing predictions……
Task Completed Successfully!!!!!!
Thanks For Reading😊😊😊