FROM python:3.11-slim WORKDIR /app # System dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ bash \ ca-certificates \ curl \ gcc \ git \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt && \ pip install --no-cache-dir git-filter-repo # Copy application code COPY . . # Install the package itself RUN pip install --no-cache-dir -e . # HF Spaces default port EXPOSE 7860 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=5 \ CMD curl -f http://localhost:7860/health || exit 1 ENV PYTHONUNBUFFERED=1 ENV PYTHONDONTWRITEBYTECODE=1 CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]