FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/* COPY . /app RUN pip install --no-cache-dir -r requirements.txt ENV PYTHONUNBUFFERED=1 # Use port 7860 explicitly (Hugging Face's default) CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]