ML-model_on_Docker-Container_Salary_Predictor(1)

task-1

docker_image_cmd- docker pull anujdocker9799/ml-docker-1:latest

github_link- https://github.com/anujgupta09/ml-docker-1-2.git

dataset_link- https://www.kaggle.com/rohankayan/years-of-experience-and-salary-dataset

Lets start ,

We need docker , Let us configure docker and install it in our system.

operating system — RHEL8

Configuring repository for docker

Path: /etc/yum.repos.d/docker.repo

content :

[docker_ce]
name=docker
baseurl=https://download.docker.com/linux/centos/7/x86_64/stable/
gpgcheck=0

Installing docker — yum install docker-ce -- nobest

note* cmd is yum install docker-ce -- nobest

Starting service and making permanent -

systemctl start docker , systemctl enable docker

docker pull centos:latest

docker run -it --name task1 centos:latest

Now we are in container ,

Installing python inside container ,

pip3 install numpy

pip3 install pandas

pip3 install sklearn

Make directory or workspace (TASK1)

Creating python ML program main.py and putting SalaryData.csv file.

using docker cp copy files inside container

docker cp Salary_Data.csv (imageid):/(directory_name)

Creating python ML program main.py and putting SalaryData.csv file.

Use python3 main.py command to run the model

Running main.py file it will prompt for Year of Experience and Output the Salary to you.

Thank You .

--

--

--

Tech_Enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Deploying a Python Flask Web Application on AWS Cloud ☁️

These are the key non-coding skills all programmers should have

Plush Family DAO

Getting started with Google Cloud SDK

Merge Sort and Quick Sort

Getting Started with Collisions in Unity

Valentine — HTB

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
AnujGupta

AnujGupta

Tech_Enthusiast

More from Medium

A Date With Ophelia

To all my friends who have been hacked…

She whispers “día de los muertes”.