Spaces:
Running
Running
| FROM python:3.10-slim | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Hugging Face Spaces containers run as a non-root user; make sure the | |
| # huggingface_hub cache directory is writable so the model can download. | |
| ENV HF_HOME=/app/.cache/huggingface | |
| RUN mkdir -p /app/.cache/huggingface && chmod -R 777 /app | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |