Spaces:
Runtime error
Runtime error
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| git curl build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install PyTorch CPU-only first (much smaller, ~500MB vs 2GB) | |
| # ZeroGPU injects CUDA at runtime — no need for CUDA torch at build time | |
| RUN pip install --no-cache-dir \ | |
| torch==2.2.1 --index-url https://download.pytorch.org/whl/cpu | |
| # Install remaining deps | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| RUN mkdir -p /data | |
| ENV PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |