Spaces:
Sleeping
Sleeping
Download Dockerfile from theJamess/text-declanker: direct link, hf CLI and curl.
- Browser
- Download file 634 Bytes
-
https://huggingface.co/spaces/theJamess/text-declanker/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/theJamess/text-declanker/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/theJamess/text-declanker/resolve/main/Dockerfile
634 Bytes
| FROM python:3.13-slim | |
| # HF Spaces runs containers as UID 1000 | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # Install dependencies (cached layer) | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| # Copy application source | |
| COPY --chown=user:user . . | |
| # Ensure the stats file location is writable at runtime | |
| RUN mkdir -p storyscope/data && chown -R user:user storyscope/data | |
| USER user | |
| EXPOSE 7860 | |
| # TRUST_PROXY=true because HF Spaces sits behind a reverse proxy | |
| ENV TRUST_PROXY=true | |
| ENV PORT=7860 | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |