Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # Writable caches for HF/Transformers inside the container | |
| ENV HF_HOME=/tmp/hf \ | |
| TRANSFORMERS_CACHE=/tmp/transformers \ | |
| HF_DATASETS_CACHE=/tmp/hf_datasets \ | |
| HF_HUB_DISABLE_TELEMETRY=1 | |
| RUN mkdir -p /tmp/hf /tmp/transformers /tmp/hf_datasets && chmod -R 777 /tmp | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |