# Use official Python image as base | |
FROM python:3.10-slim | |
# Set working directory | |
WORKDIR /app | |
# Copy requirements and install | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy app files | |
COPY . . | |
# Expose port 7860 (default for HF Spaces) | |
EXPOSE 7860 | |
# Command to run your FastAPI app with Uvicorn | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |