Deploying Machine Learning Model on Docker

yum install docker-ce --nobest
systemctl enable docker --now
docker run -it --name ml centos:latest
vim ml.pyimport pandas 
ds= pandas.read_csv('SalaryData.csv')
from sklearn.linear_model import LinearRegression
mind= LinearRegression()
x= ds['YearsExperience'].values.reshape(30, 1)
y= ds['Salary'],y),y)
import joblib
joblib.dump(mind, 'model.pk1')
vim final.pyimport joblib
mind= joblib.load('model.pk1')
x= input("Enter the experiance in years:")
op =mind.predict(x)




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