Spaces:
Sleeping
Sleeping
| FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04 | |
| WORKDIR /app | |
| ENV PYTHONUNBUFFERED=1 PORT=7860 HF_HUB_OFFLINE=0 | |
| RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ | |
| CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')" || exit 1 | |
| CMD ["python3", "app.py"] | |