Deploy Machine Learning Model on Docker

We are going to do all our practicals in RedHat Linux Enterprise 8

Step — 1: Configuring Yum Repository for Docker

we have to created a docker-ce.repo file and we have provided name, baseurl(official repository link), and gpgcheck. We disabled the software signature checking as we have provided the official link of Docker Community Edition.

Step — 2: Installing Docker Community Edition

Step — 3: Enabling the Docker Service in RHEL 8

I had to enable masquerading. It looked like docker already did this through iptables, but apparently, this needs to be specifically enabled for the firewall zone for iptables masquerading to work.

Step — 5: Pulling the Latest Centos Docker Image

"docker pull centos:latest "this command is we are going to use.

Step — 6: Create a Container with the help of docker image

Step — 7: Installing Python and necessary libraries (numpy , pandas ,scikit-learn)

use following commands for libraries

“ pip3 install numpy”

“ pip3 install pandas”

“ pip3 install scikit-learn”


Step 8: Now , copy the whole folder into the container with the help of the cp cmd

Step 9:now use “python3 file_name” command to implement your model.

and we are done!!!!😊



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