Test-api / Dockerfile
syedMohib44
Done
9b3da4f
raw
history blame contribute delete
720 Bytes
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"]