Running Machine Learning model in Docker Container

Running Machine Learning model in Docker Container

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and deploy it as one package.

Following is our Task 1:

?? Pull the Docker container image of CentOS image from DockerHub and create a new container.

?? Install the Python software on the top of docker container.

?? In Container you need to copy/create machine learning model which you have created in jupyter notebook.

Now, let's start with the first step, i.e. pulling the docker image from Dockerhub and thus creating a new container.

NOTE:- Check whether you have the repo of docker by using command "yum repolist" and install the docker by using command "yum install docker-ce".

After successful installation of the docker, pull the Docker Container Image of CentOS from Dockerhub by using command:- docker pull centos:latest

No alt text provided for this image

After successful pulling of the docker image, run the container by using command:- docker run -it --name task1 centos:latest

No alt text provided for this image

Now, the container has been launched successfully. Let's install the python3 libraries by using command:-

yum install python3

No alt text provided for this image

Install pandas by using command, pip3 install sklearn pandas

No alt text provided for this image

Now, for creating or copying the machine learning model, we'll first create the github repo and upload all the necessary files there.

No alt text provided for this image

Then clone it into the container by using command of git clone.

Note:- CHECK WHETHER YOU HAVE GIT COMMAND INSTALLED IN YOUR RHEL-8 OS.

No alt text provided for this image

Now, the last step... LET'S RUN PYTHON FILE FOR PREDICTION.

No alt text provided for this image

Hurrahhh!!!!!!! TASK HAS BEEN COMPLETED SUCCESSFULLYYYY!!!!!!

My Github Repo URL:- https://github.com/Vrush-cmd/LWMLOPS2021.git

Thank you for reading till here!!!!!????

要查看或添加评论,请登录

Vrushali Mahajan的更多文章

  • ??AMAZON SQS AND NASA??

    ??AMAZON SQS AND NASA??

    Amazon provides SDKs in several programming languages including Java, Ruby, Python, .NET, PHP, Go and JavaScript.

  • ??AWS CLI COMMANDS??

    ??AWS CLI COMMANDS??

    Task Description ?? Create a key pair. ?? Create a security group.

    1 条评论
  • ??K-mean clustering and its real usecase in the security domain??

    ??K-mean clustering and its real usecase in the security domain??

    Let's first understand, what exactly is K-mean clustering in machine learning? K-means clustering is one of the…

  • ??HELM CHARTS??

    ??HELM CHARTS??

    Before we start let us know what are Helm Charts and why do Kubernetes use them? Helm uses a packaging format called…

  • ??Multi-Node Cluster & Stateful Apps Like MySql and Wordpress??

    ??Multi-Node Cluster & Stateful Apps Like MySql and Wordpress??

    What is Kubernetes exactly? Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling,…

    2 条评论
  • ??USE CASES OF JAVASCRIPT??

    ??USE CASES OF JAVASCRIPT??

    Let's start with What exactly is Javascript? JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled…

  • IBM AND ITS USE CASES SOLVED BY KUBERNETES

    IBM AND ITS USE CASES SOLVED BY KUBERNETES

    Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of…

  • IMAGE PROCESSING WITH OPENCV USING PYTHON

    IMAGE PROCESSING WITH OPENCV USING PYTHON

    What is Image Processing? Image processing aims to transform an image into digital form and performs some process on…

  • ??CYBER CRIMES AND CONFUSION MATRIX??

    ??CYBER CRIMES AND CONFUSION MATRIX??

    Let's start with knowing, what exactly is cyber crime? Cybercrime is criminal activity that either targets or uses a…

  • RUNNING GUI APPS IN A DOCKER CONTAINER

    RUNNING GUI APPS IN A DOCKER CONTAINER

    What is GUI? Graphical user interface (GUI), a computer program that enables a person to communicate with a computer…

社区洞察

其他会员也浏览了