FROM python:3.10-slim WORKDIR /app # Install minimal system deps RUN apt-get update && apt-get install -y \ curl \ && rm -rf /var/lib/apt/lists/* # Copy project files COPY . . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose HF Spaces port EXPOSE 7860 # Run API server (not inference.py directly — HF validator needs /reset endpoint) CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]