Download Dockerfile from gsstec/fastsdcpu: direct link, hf CLI and curl.
- Browser
- Download file 854 Bytes
-
https://huggingface.co/spaces/gsstec/fastsdcpu/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/gsstec/fastsdcpu/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/gsstec/fastsdcpu/resolve/main/Dockerfile
854 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Python deps | |
| COPY requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # App source | |
| COPY . . | |
| # --------------------------------------------------------------------------- | |
| # Runtime environment — model is downloaded on first startup using HF_TOKEN | |
| # secret set in Space settings (Spaces secrets are NOT available at build time) | |
| # --------------------------------------------------------------------------- | |
| ENV MODEL_ID=gsstec/LFM2-700M | |
| ENV HF_HOME=/app/model_cache | |
| ENV TRANSFORMERS_CACHE=/app/model_cache | |
| ENV HF_HUB_DISABLE_PROGRESS_BARS=1 | |
| # HuggingFace Spaces runs as uid 1000 | |
| RUN useradd -m -u 1000 user && chown -R user /app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |