Salary Predicting Model on CentOS platform

ABHISHEK KUMAR GUPTA
3 min readMay 27, 2021

--

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.

Docker

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

THANK YOU FOR READING!!

--

--

No responses yet