Deploying Machine Learning Models using Docker containers

Skabhi
3 min readMay 29, 2021

Hello everyone.

Welcome you all to my article based on Task-01 of Deploying Machine Learning Models using Docker containers.

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.

……………………………………………………………………………………….

Steps:-

  1. πŸ‘‰ Check wheather docker is running or not.

2. πŸ‘‰ Pull the centos image from Docker hub

3. πŸ‘‰ Create a Container with the help of Centos image.

4. πŸ‘‰ Download Python and Git software

5. πŸ‘‰ Run git clone to clone the GitHub Repository where our Python code is available.

6. πŸ‘‰ Install all the libraries required for training our Machine Learning model.

7. πŸ‘‰ Create your LinearRegression Model .

I have created my LinearRegression model with name Model.py

8. πŸ‘‰ Run the Model.

After execution, we will see that a pickle file named β€œsalary.pkl” has been created.

In the β€œsalary_predictor.py”, we have loaded the pickle file and provided the User Input, and printed the result in an appropriate fashion.

9. πŸ‘‰ Run the β€œsalary_predictor.py” , to estimate the salary of the Employee.

Thank You …

--

--