Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # system deps (optional, e.g. git) | |
| RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| EXPOSE 7860 | |
| ENV HF_HOME=/app/hf-cache | |
| ENV TRANSFORMERS_CACHE=/app/hf-cache | |
| RUN mkdir -p /app/hf-cache && chmod -R 777 /app/hf-cache | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |