Spaces:
Runtime error
Runtime error
VenkateshRoshan
commited on
Commit
·
895bd1b
1
Parent(s):
e1d0160
deploy file added
Browse files- .github/workflows/deploy.yml +26 -0
- README.md +2 -1
- dockerfile +30 -0
- requirements.txt +1 -1
- src/config.py +2 -1
.github/workflows/deploy.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Deploy to Sagemaker
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
deploy:
|
| 10 |
+
runs-on: ubuntu-latest
|
| 11 |
+
|
| 12 |
+
steps:
|
| 13 |
+
- name: Checkout code
|
| 14 |
+
uses: actions/checkout@v2
|
| 15 |
+
|
| 16 |
+
- name: Setup Python
|
| 17 |
+
uses: actions/setup-python@v2
|
| 18 |
+
with:
|
| 19 |
+
python-version: 3.10
|
| 20 |
+
|
| 21 |
+
- name: Login to AWS
|
| 22 |
+
uses: aws-actions/configure-aws-credentials@v2
|
| 23 |
+
with:
|
| 24 |
+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
| 25 |
+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
| 26 |
+
aws-region: ${{ secrets.AWS_REGION }}
|
README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
# Real Time Customer Support Chatbot
|
| 2 |
-
|
|
|
|
| 3 |
---
|
|
|
|
| 1 |
# Real Time Customer Support Chatbot
|
| 2 |
+
---
|
| 3 |
+
### Developing a real-time customer support chatbot using a fine-tuned LLM to provide accurate responses. Building CI/CD pipelines for scalable deployment on AWS SageMaker and integrating MLflow for tracking model versions, experiment logging, and continuous improvements.
|
| 4 |
---
|
dockerfile
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python 3.10 slim as base image
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy the current directory contents into the container at /app
|
| 8 |
+
COPY . /app
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN apt-get update && apt-get install -y \
|
| 12 |
+
python3-pip \
|
| 13 |
+
git
|
| 14 |
+
|
| 15 |
+
# Install pip packages without caching
|
| 16 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 17 |
+
RUN pip install --no-cache-dir torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121
|
| 18 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
+
|
| 20 |
+
# Copy .env file to the working directory
|
| 21 |
+
COPY .env /app/.env
|
| 22 |
+
|
| 23 |
+
# Set environment variables from .env file
|
| 24 |
+
ENV $(cat /app/.env | xargs)
|
| 25 |
+
|
| 26 |
+
# Expose port 7860
|
| 27 |
+
EXPOSE 7860
|
| 28 |
+
|
| 29 |
+
# Run the application
|
| 30 |
+
CMD ["python", "app.py"]
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
transformers
|
| 2 |
torch
|
| 3 |
mlflow
|
| 4 |
boto3
|
|
|
|
| 1 |
+
transformers==4.37
|
| 2 |
torch
|
| 3 |
mlflow
|
| 4 |
boto3
|
src/config.py
CHANGED
|
@@ -56,4 +56,5 @@ class Config:
|
|
| 56 |
|
| 57 |
# DVC configurations
|
| 58 |
DVC_REMOTE_NAME = "s3-storage"
|
| 59 |
-
DVC_REMOTE_URL = f"s3://{S3_BUCKET}/dvc"
|
|
|
|
|
|
| 56 |
|
| 57 |
# DVC configurations
|
| 58 |
DVC_REMOTE_NAME = "s3-storage"
|
| 59 |
+
DVC_REMOTE_URL = f"s3://{S3_BUCKET}/dvc"
|
| 60 |
+
|