Spaces:
Sleeping
Sleeping
| # Dockerfile — Gradio demo app for Hugging Face Spaces | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install dependencies first (cached layer) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy source | |
| COPY models/ models/ | |
| COPY training/ training/ | |
| COPY app/ app/ | |
| COPY data/dataset.py data/dataset.py | |
| COPY config.py . | |
| COPY app.py . | |
| # Checkpoints are copied separately so this layer is not invalidated on code changes | |
| COPY checkpoints/best_sr_gaussian.pth checkpoints/best_sr_gaussian.pth | |
| COPY checkpoints/best_sr_salt_pepper.pth checkpoints/best_sr_salt_pepper.pth | |
| COPY checkpoints/best_sr_speckle.pth checkpoints/best_sr_speckle.pth | |
| EXPOSE 7860 | |
| # HF Spaces requires 0.0.0.0 | |
| ENV GRADIO_SERVER_NAME=0.0.0.0 | |
| ENV GRADIO_SERVER_PORT=7860 | |
| CMD ["python", "app.py"] | |