3v324v23's picture
Deploy backend to Hugging Face Spaces
6f4e455
raw
history blame contribute delete
322 Bytes
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}"]