# Use an official Python runtime FROM python:3.10-slim # Set the working directory WORKDIR /app # Copy requirements and install COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the backend files COPY . . # Expose the mandatory Hugging Face port EXPOSE 7860 # Run the FastAPI server. Update "main:app" to "app:app" if app.py is your true entrypoint. CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]