Salary Predictor Program Using ML running in Docker container

Abhishek Chouhan
3 min readMay 31, 2021
Created by Abhishek Chouhan

Hey Folks !

Today, I am here with new article explaining how we can create a salary predictor program using ml running on docker container.

Task Description

- 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

Before starting it Iwant to tell you some of the prerequisites that require to complete this task and it will clear the setup of the task in your mind.

→ First of all i have install RedHat 7 on the top of my base OS windows using virtualization

→ Installed RedHat 7 VM (Virtual Machine) is now ready to use then I have downloaded docker in it and performed the operations.

I am not showing all above pre-requisites because, I have already explained them before.

So lets start

Here, I am creating new directory/folder for the task so that we can manage our Dockerfile code here.

Inside above directory i am creating a new directory for the python code and dataset

checking files

Here is Dockerfile


Our main machine learning code for predictions

machine learning code

building the image with docker build command

docker build -t ‘image_name’ ‘path of the dockerfile’

if the Dockerfile is in the same location where you are building it then you can use . (dot) in place of ‘path of the dockerfile’ in above command.

building image

Dockerfile though cat command

Code through cat command once again just want to show you once again.

Got the prediction for 1.1 years of experience option because have input this in the code

we can also modify this by adding choice option in which we can input the year of experience and according to that it will print salary.


📝 ️Few Last Words

→ There Are Many things about medium that i will be discussing in my upcoming article .

→ I will be sharing many article’s on Integrating multiple tools and technologies Cloud Computing, DevOps, Big Data Hadoop, Machine Learning etc. In Upcoming days .

→ Follow me on Medium for more Article’s on Research based and integration of new new tools and technologies .

Github Link for code

For Furthur Queries, Suggestion’s Feel Free to Connect with me On Linkedin .

I Hope you learned something new from this article .

If you like it then Clap & Share ..

Thank you EveryOne For reading .!!



Abhishek Chouhan

Technology Enthusiast Like to learn new new tools and technology and integrate them, DevOps, Cloud, MLOps, Kubernetes, AWS, Terraform, Expertise in Docker…