Executing ML model inside Docker
Hello everyone😊
This is the article on "Executing ML model inside docker." I have used Redhat Linux as a docker host and CentOS as a container.
==========================================================
Model: Salary predictor on years of experience
Task_1 Description:
👉 Pull the Docker container image of CentOS image from DockerHub and create a new container
👉 Install the Python software on the top of the docker container
👉 In Container you need to copy/create a machine learning model which you have created in Jupyter notebook
==========================================================
1. Install docker in your base system.
Commands to install docker
Now check if docker is successfully installed in your system
2. Pull the Docker container image of CentOS from DockerHub and create a new container
3. Install the Python software on the top of the docker container
- run docker by creating a container and install python3.
docker run -i -t --name=container_name centos:latest
- install the libraries required for the model i.e., pandas, numpy, and scikit-learn.
4. In Container you need to copy/create a machine learning model which you have created in Jupyter notebook.
Copy your ML model inside the docker by using the command:
docker cp file_name container_name:/file_name
- Create a file and write the code to import your model and inserting the data for which you need the prediction.
- Run the code in Python3.
==========================================================
Thank you all for giving it a read.
😊
Well done 💥MUKUL PRAMANIK
Great to hear! Well done 👍
Awesome!!
Well done 👍