Spaces:
Sleeping
Sleeping
| # 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"] |