MACHINE LEARNING MODEL ON DOCKER CONTAINER
Task Description
Create and run Machine Learning Model on a Docker container
#you should may have docker configured in BaseOS
step 1:Pull a centos docker image from the docker hub
# docker pull centos:latest version(8)
Step 2: Create a docker container with centos image
#docker run -it — name=<name_of_container> <image>:<version>
Step 3: Install python in Docker container using command
#yum install python3
Step 4: Install numpy , pandas, and sklearn python libraries
#pip3 install numpy
#pip3 install pandas
#pip3 install sklearn
Step 5: Created a Directory for the Project
Step 6 : Copy dataset from base os to Docker container
Step 7 : Create a python file model.py to create a model that will predict the salary of employee based on years of experience. Save the model using joblib.
Run the above python file , Which will create our model .
Step 8 : Create a python file (train_model.py)that will predict an employee’s salary using the above trained model.
Run the file, enter the years of experience and that will predict the salary of employee.
And our model is Working ..!!
Hope It will help you..!!