Download Dockerfile from FINAL-Bench/POCKET-Zimage-CPU: direct link, hf CLI and curl.
- Browser
- Download file 787 Bytes
-
https://huggingface.co/spaces/FINAL-Bench/POCKET-Zimage-CPU/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/FINAL-Bench/POCKET-Zimage-CPU/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/FINAL-Bench/POCKET-Zimage-CPU/resolve/main/Dockerfile
787 Bytes
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl ca-certificates unzip libgomp1 && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| RUN pip install --no-cache-dir fastapi==0.115.6 uvicorn==0.34.0 pydantic==2.10.4 | |
| # stable-diffusion.cpp CPU build | |
| RUN mkdir -p /app/bin && cd /tmp && \ | |
| curl -sL -o sd.zip https://github.com/leejet/stable-diffusion.cpp/releases/download/master-913-b167b94/sd-master-b167b94-bin-Linux-Ubuntu-24.04-x86_64.zip && \ | |
| unzip -q sd.zip -d /app/bin && chmod +x /app/bin/sd-cli || true | |
| COPY app.py index.html /app/ | |
| RUN mkdir -p /app/models /app/outputs /app/static | |
| ENV SD_BIN=/app/bin/sd-cli | |
| ENV LD_LIBRARY_PATH=/app/bin | |
| ENV SD_THREADS=8 | |
| EXPOSE 7860 | |
| CMD ["uvicorn","app:app","--host","0.0.0.0","--port","7860"] | |