Spaces:
Runtime error
Runtime error
Download Dockerfile from whosouravsharma/diffusiondb-sd15-lora-inference: direct link, hf CLI and curl.
- Browser
- Download file 976 Bytes
-
https://huggingface.co/spaces/whosouravsharma/diffusiondb-sd15-lora-inference/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/whosouravsharma/diffusiondb-sd15-lora-inference/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/whosouravsharma/diffusiondb-sd15-lora-inference/resolve/main/Dockerfile
976 Bytes
| # Only needed if you run this outside a Gradio Space (locally, or as an | |
| # sdk: docker Space). A plain `sdk: gradio` Space builds its own container | |
| # from requirements.txt and does not use this file. | |
| FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| python3.10 python3-pip git && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Spaces run as uid 1000 and only $HOME is writable; the model cache must | |
| # live somewhere this user can actually write or startup fails. | |
| RUN useradd -m -u 1000 app | |
| USER app | |
| ENV HOME=/home/app \ | |
| HF_HOME=/home/app/.cache/huggingface \ | |
| PATH=/home/app/.local/bin:$PATH | |
| WORKDIR /home/app | |
| COPY --chown=app requirements.txt . | |
| RUN pip3 install --user --no-cache-dir -r requirements.txt | |
| COPY --chown=app app.py ./ | |
| COPY --chown=app src/ ./src/ | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| CMD ["python3", "app.py"] | |