Task 1: Loading Machine Learning model on Docker container
This loads up your machine learning model on the Docker Container,hope you will enjoy itπ
π 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
Step 01:Check wheather docker is running or not:
Step 02 : Pull the Centos Image from Docker hub.
β docker pull centos:latest β
Step 03 : Create a Container with the help of Centos image.
β docker run -i -t β name=container_name centos:latest β
Step 04 : Check Container Start or not. if doesnβt start please re check your command or use others command.
Step 05 : We want to Download Python Software inside Container. Use the command
β yum install python3 β
Step 06 : Install all the libraries in your RHEL8. For Machine Learning model depend.
β pip3 install numpy β
β pip3 install pandas β
β pip3 install scikit-learn β
Step 07 : Install Vim by using the following command if not installed before:
β yum install vim -yβ
Step 08: Copy Your model Inside Container. and itβs copied or not. If You have an error of your file or folder is not show there then with the help of winSCP software you can copy your file or folder and paste it to your Linux. and then check with the help of <ls> command or you can mail yourself the file of dataset if it is a small dataset only.
β docker cp Model_file_name Container name:/model_file_name β
You need to run this command in our base/host system in my case it is Redhat Linux
Step 09 : Create a Model file in Docker with the following code:
Step 10: Run the Model.
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β -
Thatβs All
Thank You so much for giving your Valueable Time.
-Aditya Jain-
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β -