Spaces:
Sleeping
Sleeping
File size: 673 Bytes
81726c9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Dockerfile
FROM python:3.11-slim
# System dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
curl \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first (layer caching)
COPY requirements.txt .
# Install Python dependencies (no GPU on HF Spaces)
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download embedding model during build
RUN python3 -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('intfloat/multilingual-e5-large')"
# Copy project files
COPY . .
# HuggingFace Spaces runs on port 7860
EXPOSE 7860
# Run Flask app
CMD ["python3", "app.py"] |