Trained ML model over Docker

Hello Readers!
In this article we are going to discuss about deploying a trained Machine Learning model over Docker — a containerization technology.
Note : The practical is performed on AWS cloud and RHEL is used as base os.
Let’s start…………
Step 1 : Install Docker
Configure yum
Command to check yum is configured or not : yum repolist

Install docker

Start and enable docker services
To start the service : systemctl start docker
To enable the service : systemctl enable docker
To check the status of the service: systemctl status docker

Step 2 : Pull Docker image
Here, we are pulling centos image and launching the container with name “ML-summer-os”
Command :
docker pull centos:latest
docker run -it — name ML-summer-os centos:latest

Step 3 : Install software required for data analysis
Commands:
yum install python3
pip3 install sklearn pandas


Step 4 : Install git
Command: yum install git

Step 5 : Clone the git repository
Command: git clone <repository_link>

Step 6 : Go to the folder and list the files

We are able to see our files created in it. To efficiently run python files convert the .ipynb files to .py files
Step 7 : Run the file Salary_Prediction.py


Thus, we have deployed our model on Docker container.
Do try this practical!!!
Keep Learning!
Keep Sharing!
Stay safe……….