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

“Holographic” Science-Research, September 2021, Week 1 — summary from Arxiv, DOAJ and PubMed

Behind the router: Modeling dockless bikes

A model that smokes everyone else

How to plot wholesome confusion matrix?

CSV in HuggingFace Datasets

Zoom in... enhance: a Deep Learning based magnifying glass - part 2

Bias-Variance tradeoff in Machine Learning models: A practical example

Announcing Aquarium’s Seed Fundraising Led By Sequoia with Participation from Y Combinator

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

Python Environment Setup in AWS

PYTHON ALGORITHM…AGAIN.(Depth first search(Dfs))

Our First Expedition into Open-Source Coding

10 Minutes of Killer Python Inspiration With Influencer Mike Driscoll