Salary Predictor Model using machine learning on Docker

Summer Program 2021 #Task1

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 the docker container.
  • In Container, you need to copy/create a machine learning model which you have created in jupyter notebook.

step 1:We have collected Data and formed a dataset.

Step 2: Prepare an ML model of linear regression on Jupyter NoteBook

Step 3: Check if the Docker is available

We use the command: docker info

Step 4: Download CentOS latest version image from Docker Hub

We use the command: docker pull centos:latest

Step 5: Create a Container with the help of CentOS image

We use the command: docker run -i -t — name=<name> centos:latest

Step 6: Download Python in the Container

We use the command: yum install python3

Step 7: Install the necessary libraries for the Python

pip3 install NumPy

pip3 install pandas

pip3 install scikit-learn

Step 8: Copy the ML Model from the host to the container

Copy the model and .csv file from the host machine to the guest machine

We use the command:

docker cp <model_name> <container_name>:/<model_name>

Step 9: Create a Model file in the Container

Open a vi editor and make a file with .py extension.

Step 10: Run the model on python

To run the code for test we use the command: python3 model.py

Thank you!

--

--

--

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

Recommended from Medium

Deployment of AI models is such a headache

Transformers -A simple Go Through

The #paperoftheweek is “StyleGAN2 Distillation for Feed-forward Image Manipulation”

3D object reconstruction using a few views despite noisy camera poses with FvOR

Overview of Transfer Learning in NLP — Contextual Word Vectors

Create a Plants/Fruits Image Classifier using Fastai v1 in Colab

Efficiently identify people in image in one stage without separate detection step

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
Mohammed Adnan

Mohammed Adnan

More from Medium

Data Structures in Python

Programming Languages: Pick Your Poison (C++ vs Python vs Java)

The ChekaiBeingLazy algorithm

divine providence vs the algorithm