This image contains a basic machine learning model that will be deployed on AWS EKS.
49
Simple Text Classification Model
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).
The application exposes a simple REST API that accepts text input and returns a classification prediction from the trained machine learning model.
Follow the steps below to run the Dockerized application on your local machine.
The Docker image is available on Docker Hub:
docker pull vimalpillai/mlops-aws-eks-deployment:v1
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/
The model provides a /predict endpoint for making predictions.
POST http://localhost:4000/predict
Send the input text as JSON:
curl -X POST http://localhost:4000/predict \
-H "Content-Type: application/json" \
-d '{"text":"not interested"}'
{
"text": "not interested"
}
The API will process the text using the machine learning model and return the corresponding prediction.
Client
|
| POST /predict
v
Flask API
|
v
ML Text Classification Model
|
v
Prediction
|
v
JSON Response
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
# 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"}'
Content type
Image
Digest
sha256:cc62dd498…
Size
125.9 MB
Last updated
9 days ago
docker pull vimalpillai/mlops-aws-eks-deployment:v1