Machine Learning model in Docker container with Python..

Follow the steps to deploy machine learning model on Docker Container……

Step 1. Run the docker container

# docker run -it centos:latest

Step 2. Install the Python Interpreter and python modules ..

[Note — yum is pre configured in centos container]

# yum install python3 -y

Now we will install the python modules needed for the model

# pip3 install scikit-learn -y

#pip3 install numpy -y

# pip3 install pandas -y

Now we will copy the Salary_Data.csv from the base RedHat OS.

# docker cp Salary_Data.csv [container id]:/root

check if your docker container is running

# docker ps

If your docker container is stopped then

# docker start[container id]

# docker attach [container id]

Now, since we have already install the python interpreter and python modules in our docker container, So we are good to go with the Machine Learning Programing.

Note You can find the code in my GitHub Repository link provided below

link — https://github.com/code-sourabh/Machine-Learning-Docker-container-Python.git

Now run the python file

# python3 salary data ml model.py

--

--

--

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

Recommended from Medium

Behind the router: Modeling dockless bikes

How to integrate machine learning models into your app?

A Simple CNN: Multi Image Classifier

How to Choose the Right Machine Learning Algorithm?

A quick run-through of Holt-Winters, SARIMA and FB Prophet

Quickly plug satellite imagery into your favorite machine learning framework

Dog Breed Classification using Keras

Getting Caught Up

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
Sourabh Mishra

Sourabh Mishra

More from Medium

PyTest Use Cases

PanDas in Depth— Building Flexible DataFrames

Inserting Pandas DataFrames into IBM Db2 on Cloud using Python

what is imodels python Library.