File size: 720 Bytes
6a03bb0
 
 
 
 
 
 
 
9b3da4f
6a03bb0
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10-slim

RUN apt-get update && apt-get install -y git git-lfs wget unzip && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

WORKDIR /app
COPY app.py .
COPY dataset ./dataset

# Hugging Face cache fix
ENV TRANSFORMERS_CACHE=/app/models/.cache

# Clone models
RUN git lfs install && \
    git clone https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2 /app/models/all-MiniLM-L6-v2 && \
    git clone https://huggingface.co/facebook/opt-1.3b /app/models/facebook-opt-1.3b && \
    git clone https://huggingface.co/facebook/bart-large-cnn /app/models/bart-large-cnn

EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]