Bhavesh003's picture
Upload folder using huggingface_hub
d47d9c5 verified
FROM python:3.10-slim
WORKDIR /app
# copy code and requirements
COPY . /app
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# (optional) set env to tell uvicorn to use lower log/threads
ENV PYTHONUNBUFFERED=1
# Ports: Spaces expects the app to listen on 7860 by convention for UIs/APIs
EXPOSE 7860
# Start Uvicorn serving your FastAPI app module `app:app` (adjust if your module/file name differs)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--loop", "uvloop", "--workers", "1"]