Training a ML model inside a container

Training a ML model inside a container

Task 01 👨🏻‍💻

Task Description 📄

👉 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 create machine learning model

1.First let's get the docker image

No alt text provided for this image

2.Now let's run the container and get inside it

No alt text provided for this image

3.Now install python in this container

No alt text provided for this image

4.We have to download pandas library for loading our dataset and the scikit-learn library for training the model

No alt text provided for this image

5.Check the installation by pip3 list command

No alt text provided for this image

6.Now from docker host let's transfer the csv file

No alt text provided for this image

7.This is code for training

No alt text provided for this image

8. This is code for testing, ie we predict the value for 3.6 years of experience

No alt text provided for this image

9. Now let's run the prediction code

No alt text provided for this image

We get the value 59812.06 !


To view or add a comment, sign in

More articles by Yash Indane

  • Use of K-mean clustering in security domain

    Summer Task-10 & ARTH Task 42 Github -> What is K-means Clustering? K-means clustering is one of the simplest and…

  • OSPF Routing Protocol using Dijkastra Algorithm

    What is OSPF? The OSPF (Open Shortest Path First) protocol is one of a family of IP Routing protocols, and is an…

  • Using Face Recognition for automation

    SUMMER-TASK-6 (Team Task) and ARTH TASK 38 GitHub -> In this article I will explain how we can use Face Recognition and…

    3 Comments
  • JavaScript use cases in Industry

    Summer Task 7.2 What is JavaScript? JavaScript, often abbreviated as JS, is a programming language that conforms to the…

    1 Comment
  • Use of confusion matrix in detecting cyber crime

    Summer 2021 Task 05 👨🏻💻 Particularly in the last decade, Internet usage has been growing rapidly. However, as the…

  • Running Chrome in Docker container

    Summer - Task 02 👨🏻💻 By default containers don't support GUI, but by some way we can achieve that, let's discuss…

    3 Comments
  • Deploying WordPress in Amazon EKS with RDS in Backend

    ARTH-TASK-23 WordPress is a free and open-source content management system written in PHP and paired with a MySQL or…

    3 Comments
  • How industry uses MongoDB

    ARTH-TASK-32 What is MongoDB? MongoDB is a source-available cross-platform document-oriented database program…

  • Creating a Multicloud Setup of Kubernetes using Ansible Roles

    TASK 28 Task Description 📄 📌 CREATE A MULTI-CLOUD SETUP of K8S cluster: 🔅 Lunch node in AWS 🔅 Lunch node in Azure…

    2 Comments
  • Helm and Charts in Kubernetes

    ARTH TASK 24 What are Charts ? A chart is a collection of files that describe a related set of Kubernetes resources. A…

Explore content categories