FROM python:3.10-slim | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
# For Hugging Face Spaces - it expects port 7860 by default | |
ENV PORT=7860 | |
# Entry point that will be used by Hugging Face Spaces | |
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "${PORT}"] |