First we will understand what is machine learning(ML) and Docker.
Machine learning:- Machine learning is an application/program or subset of AI that allows machines to learn from data without being programmed explicitly.
Docker:-It is a tool that provides platform to create, run and deploy the applications by using containers. Docker is a bit like a virtual machine rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they're running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.
Here are the complete steps:-
Step 1:
Install docker
#yum install docker-ce --nobest
if you have already installed check for query
#rpm -q docker-ce
step 2:
check status of docker
#systemctl status docker
if services are not enabled run
#systemctl start docker
step 3:
download the latest centos image from docker hub
#docker pull centos:latest
step 4:
deploy a latest centos new container
#docker run -it --name MyOs centos:latest
by passing -it arguments provides terminal and we can interact with it.
STEP 5:
Installing python3 on centos container
Step 6:
Now installing all required packages
#pip3 install numpy
#pip3 install pandas
#pip3 install sklearn
step 7:
copying dataset from base os to centos container
#docker cp /root/salary.csv MyOs:/ML
Step 8:
Code to run for ML model
Final Step:
#python3 model.py
Here is the complete output of our ML model
THANK YOU
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)