Launching ML model on Docker

Task Overview

  • Docker should be installed on your system.
  • Disable Firewall.

Steps for Completing the Task

  1. First we need to pull the centos image from DockerHub.
docker cp <SOURCEFILE_PATH>  <CONTAINER_NAME>:<DESTINATION_PATH>SOURCEFILE_PATH: Path to the file inside your baseOS i.e here RHEL8CONTAINER_NAME: Path of the container name in which you want to                     transfer file. 
Note: Container should be running.
DESTINATION_PATH: Path inside docker container where you wanted to copy the file from baseOS.
import 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)
output= mind.predict([[3]])



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