Spaces:
Running
Running
| FROM python:3.10-slim | |
| # System deps (important for pdf parsing stability) | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libxml2 \ | |
| libxslt1-dev \ | |
| zlib1g-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Install Python deps first (better caching) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app | |
| COPY . . | |
| # Expose FastAPI port | |
| EXPOSE 7860 | |
| # Run app (HF Spaces expects port 7860) | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |