| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| poppler-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY app.py . | |
| # Copy static folder with all contents | |
| COPY static/ ./static/ | |
| # Debug: List files to verify copy | |
| RUN ls -la && ls -la static/ && ls -la static/assets/ || true | |
| # Expose port 7860 (Hugging Face default) | |
| EXPOSE 7860 | |
| # Set environment variable | |
| ENV FLASK_ENV=production | |
| # Run Flask app | |
| CMD ["python", "app.py"] | |