Salary Predicting Model on CentOS platform
Task Overview
π 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, Create machine learning model.
Task Description
Docker
Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines.
Let's begin the task
Step1:Add a Docker repo in β/etc/yum.repos.d/β to install Docker-ce
# vim dockerce.repo
# yum install docker-ce β nobest -y
# systemctl enable docker β now
Step2:Running the Docker Container using Centos Image
Step3:Copying my Salary_Data.csv which will be needed to train the Model.
# docker cp Salary_Data.csv mlos1:/
>> Here Salary_Data.csv is my file name which I want to Copy to docker Container
>> βmlos1β is the Container Name
>> Inside Docker we are copying file in β/β Directory
Step4:
Installing Required Software to create a ML model
# yum install python3
# pip3 install pandas
# pip3 install scikit-learn
Step5:
Creating a Basic Linear Regression ML
#yum install vim -y
# vim predict.py
Step6:
Running the Final Created Code to predict the Salary as per Years