Sign inSign up

vimalpillai/mlops-aws-eks-deployment

By vimalpillai

•Updated 9 days ago

This image contains a basic machine learning model that will be deployed on AWS EKS.

Image
Machine learning & AI
Data science
0

49

vimalpillai/mlops-aws-eks-deployment repository overview

Simple Text Classification Model

⁠Text Classification Model — AWS EKS Deployment

This project contains a basic machine learning text classification model deployed using Flask and containerized with Docker. The application is designed to be deployed on AWS Elastic Kubernetes Service (EKS).

⁠Project Overview

The application exposes a simple REST API that accepts text input and returns a classification prediction from the trained machine learning model.

⁠Tech Stack
  • Python
  • Machine Learning
  • Flask
  • Docker
  • AWS EKS
  • REST API

⁠Run Locally

Follow the steps below to run the Dockerized application on your local machine.

⁠1. Pull the Docker Image

The Docker image is available on Docker Hub:

docker pull vimalpillai/mlops-aws-eks-deployment:v1
⁠2. Run the Container

Start the application using:

docker run -d -p 4000:6000 vimalpillai/mlops-aws-eks-deployment:v1

This maps the local port 4000 to port 6000 inside the container.

Once the container is running, the API will be accessible at:

http://localhost:4000/

⁠Prediction API

The model provides a /predict endpoint for making predictions.

⁠Endpoint
POST http://localhost:4000/predict
⁠Request

Send the input text as JSON:

curl -X POST http://localhost:4000/predict \
  -H "Content-Type: application/json" \
  -d '{"text":"not interested"}'
⁠Request Body
{
  "text": "not interested"
}

The API will process the text using the machine learning model and return the corresponding prediction.

⁠API Flow

Client
   |
   | POST /predict
   v
Flask API
   |
   v
ML Text Classification Model
   |
   v
Prediction
   |
   v
JSON Response

⁠AWS EKS Deployment

The same Dockerized application can be deployed to Amazon EKS (Elastic Kubernetes Service).

The typical deployment flow is:

Machine Learning Model
        |
        v
Flask Application
        |
        v
Docker Image
        |
        v
Docker Hub
        |
        v
AWS EKS
        |
        v
Kubernetes Service
        |
        v
REST API

⁠Quick Start

# Pull the image
docker pull vimalpillai/mlops-aws-eks-deployment:v1

# Run the container
docker run -d -p 4000:6000 vimalpillai/mlops-aws-eks-deployment:v1

# Test the prediction API
curl -X POST http://localhost:4000/predict \
  -H "Content-Type: application/json" \
  -d '{"text":"not interested"}'

Tag summary

Content type

Image

Digest

sha256:cc62dd498…

Size

125.9 MB

Last updated

9 days ago

docker pull vimalpillai/mlops-aws-eks-deployment:v1