Salary Predictor App Using Machine Learning and Docker

Swarnim Kashyap
3 min readMay 27, 2021

--

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 mode

It is a ML Based App that predicts salary on the basis of year of experience of the employee.

Machine Learning:

Machine learning is the study of computer algorithms that improve automatically through experience and by the use of data. It is seen as a part of Artificial Intelligence. Machine learning algorithms build a model based on sample data, known as “training data” ,in order to make predictions or decisions without being explicitly programmed to do so. Machine learning algorithms are used in a wide variety of applications, such as in medicine, email filtering and computer vision, where it is difficult or unfeasible to develop conventional algorithms to perform the needed tasks.

Docker:

Docker is a software platform for building applications based on containers — small and lightweight execution environments that make shared use of the operating system kernel but otherwise run in isolation from one another. While containers as a concept have been around for some time, Docker, an open source project launched in 2013, helped popularize the technology, and has helped drive the trend towards containerization and microservices in software development that has come to be known as cloud native development.

Let’s get started 🙌

Step 1: Install docker in our RedHat OS.

Command: yum install docker-ce — nobest

Checking status of docker:

Step 2: Pull CentOS image from DockerHub

Command: docker pull centos

Step 3: Launch Container

Command: docker run -it centos:latest

Step 5: Install python libraries.

pip3 install numpy

pip3 install pandas

pip3 install sklearn

Step 6: Copying the Machine Learning Model from local host to docker container.

“docker cp <src> <container_name>:<dest>”

Final Step : Run the python prediction program 👇

Final Output 👇

Hope you find this article Helpful !!

Thanks for reading 🙌

--

--

Swarnim Kashyap

RedHat Certified Engineer| DevOps Enthusiast | Big Data Hadoop | RedHat Linux 8| AWS Cloud | GCP | Azure Cloud |GIT & GitHub |Python