FROM python:3.10-slim WORKDIR /app # Install basic system build dependencies RUN apt-get update && apt-get install -y \ build-essential \ && rm -rf /var/lib/apt/lists/* # Copy and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the entire project layout into the container COPY . . # Expose the mandatory Hugging Face port EXPOSE 7860 # Run Uvicorn bound to port 7860 CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]