Deploy machine learning on docker

What is machine learning?

What is Docker?

Follow these steps:-

Step1:- First we install the Docker on rhel8. After following these steps.

Step2:- Open the rhel8 terminal then run the command. We have to pull centos image.
>docker pull centos:latest

Step3:- We have to run docker image on rhel8 terminal.
>docker run -it centos

Step4:- Install python3 in the container.
>yum install python3

Step5:- Install some library on the container. For the moment we will just install two libraries which we need. 1. Pandas 2.sciket-learn
>pip3 install pandas
>pip3 install sciket-learn

Step6:- After installing the library we need a dataset. Now I am copy the data from my rhel8 OS to Docker container centos.
* Run this command on your rhel8 os
>docker cp salary.csv elated_driscoll:salary.csv
*[elated_driscoll] is the name of the container.

Step7:- After copy the dataset we create the python program on container OS in VI text editor.

  • In file write the machine learning code.

Step8:-This is the final step, After Write the code we need to run the program.

Run this command on your container OS.



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