...
| Code Block |
|---|
services:
sdnext-ipex:
build:
dockerfile: Dockerfile
image: liutyi/sdnext-ipex:latest25.9.1-igpu
container_name: sdnext-ipex
restart: unless-stopped
devices:
- /dev/dri:/dev/dri
# - /dev/accel:/dev/accel
environment:
- HF_DEBUG=True
ports:
- 7860:7860
volumes:
- /docker/sdnext/app-volume:/app
- /docker/sdnext/mnt-volume:/mnt
- /docker/sdnext/huggingfacehf-volume:/root/.cache/huggingface
- /docker/sdnext/python-volume:/usr/local/lib/python3.10
# - /dev/shm:/dev/shm |
Dockerfile
...
| Code Block |
|---|
# SD.Next IPEX Dockerfile # docs: <https://github.com/vladmandic/sdnext/wiki/Docker> # base image FROM ubuntu:noble # metadata LABEL org.opencontainers.image.vendor="SD.Next" LABEL org.opencontainers.image.authors="disty0liutyi" LABEL org.opencontainers.image.url="https://github.com/vladmandicliutyi/sdnext/" LABEL org.opencontainers.image.documentation="https://github.com/vladmandic/sdnext/wiki/Docker" LABEL org.opencontainers.image.source="https://github.com/vladmandic/sdnext/" LABEL org.opencontainers.image.licenses="AGPL-3.0" LABEL org.opencontainers.image.title="SD.Next IPEX" LABEL org.opencontainers.image.description="SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models" LABEL org.opencontainers.image.base.name="https://hub.docker.com/_/ubuntu:noble" LABEL org.opencontainers.image.version="latest25.9.0" # essentials RUN apt-get update && \ apt-get install -y --no-install-recommends --fix-missing \ software-properties-common \ build-essential \ ca-certificates \ wget \ gpg \ git # python3.12 RUN apt-get install -y --no-install-recommends --fix-missing \ libgomp1 \ python3 \ python3-dev libtbb12 # NPU RUN wget https://github.com/intel/linux-npu-driver/releases/download/v1.23.0/linux-npu-driver-v1.23.0.20250827-17270089246-ubuntu2404.tar.gz &&\ python3tar -venv \ python3-pip # Install Python 3.13 from the deadsnakes PPA #RUN add-apt-repository ppa:deadsnakes/ppa && \ # apt-get update && \ # apt-get install -y python3.13 python3.13-dev python3-pip python3-venv # intel compute runtime RUN https_proxy=http://proxy.example.com:18080/ wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg RUN echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu noble client" | tee /etc/apt/sources.list.d/intel-gpu-noble.list RUN https_proxy=http://proxy.example.com:18080/ apt-get update RUN https_proxy=http://proxy.example.com:18080/xf linux-npu-driver-v1.23.0.20250827-17270089246-ubuntu2404.tar.gz &&\ dpkg -i *.deb &&\ rm -f linux-npu-driver-v1.23.0.20250827-17270089246-ubuntu2404.tar.gz intel-* # required by pytorch / ipex RUN apt-get install -y --no-install-recommends --fix-missing \ intel-opencl-icdlibgl1 \ libze-intel-gpu1 \ libze1 # required by pytorch / ipex RUN https_proxy=http://proxy.example.com:18080/ libglib2.0-0 # python3.12 RUN apt-get install -y --no-install-recommends --fix-missing \ libgl1python3 \ libglib2.0python3-0dev \ libgomp1 # jemalloc is not required but it is highly recommended (also used with optional ipexrun) RUN https_proxy=http://proxy.example.com:18080/python3-venv \ python3-pip # intel compute runtime RUN add-apt-repository ppa:kobuk-team/intel-graphics RUN apt-get update RUN apt-get install -y --no-install-recommends --fix-missing libjemalloc-dev ENV LD_PRELOAD=libjemalloc.so.2 \ intel-opencl-icd \ libze-intel-gpu1 \ libze1 # cleanup RUN /usr/sbin/ldconfig RUN https_proxy=http://proxy.example.com:18080/ apt-get clean && rm -rf /var/lib/apt/lists/* # stop pip and uv from caching ENV PIP_NO_CACHE_DIR=true ENV UV_NO_CACHE=true/* # set paths to use with sdnext ENV SD_DOCKER=true ENV SD_VAE_DEBUG=true ENV SD_DATADIR="/mnt/data" ENV SD_MODELSDIR="/mnt/models" ENV venv_dir="/mnt/python/venv" # paths used by sdnext can be a volume if necessary #VOLUME [ "/app" ] #VOLUME [ "/mnt/data" ] #VOLUME [ "/mnt/models" ] #VOLUME [ "/mnt/python" ] #VOLUME [ "/root/.cache/huggingface" ] # intel specific environment variables /venv" ENV IPEX_SDPA_SLICE_TRIGGER_RATE=1 ENV IPEX_ATTENTION_SLICE_RATE=0.5 ENV IPEX_FORCE_ATTENTION_SLICE=-1 ENV IPEXRUN=True # git clone and run sdnext # RUN echo '#!/bin/bash\ngit status || git clone https://github.com/vladmandic/sdnext.git -b dev .\n/app/webui.sh "$@"' | tee /bin/startup.sh RUN chmod 755 echo '#!/bin/startup.sh # actually run sdnext WORKDIR /app ENTRYPOINT [ "startup.sh", "-f", "--use-ipex", "--uv", "--listen", "--insecure", "--share", "--server-name sdnext.example.com", "--update", "--debug", "--api-log", "--log", "sdnext.log" ] #ENTRYPOINTbash\ngit status || git clone https://github.com/liutyi/sdnext.git -b ipex .\n/app/webui.sh "$@"' | tee /bin/startup.sh RUN chmod 755 /bin/startup.sh # actually run sdnext WORKDIR /app ENTRYPOINT [ "startup.sh", "-f", "--use-ipex", "--uv", "--listen", "--debuginsecure", "--api-log", "--log", "sdnext.log" ] # expose port EXPOSE 7860 # healthcheck function #HEALTHCHECK --interval=60s --timeout=10s --start-period=60s --retries=3 CMD curl --fail http://localhost:7860/sdapi/v1/status || exit 1 # stop signal STOPSIGNAL SIGINT |
...
| Code Block |
|---|
{
"sd_model_checkpoint": "Diffusers/imnotednamode/Chroma-v36-dc-diffusers [38ce7ce7f3]",
"outdir_txt2img_samples": "/mnt/data/outputs/text",
"outdir_img2img_samples": "/mnt/data/outputs/image",
"outdir_control_samples": "/mnt/data/outputs/control",
"outdir_extras_samples": "/mnt/data/outputs/extras",
"outdir_save": "/mnt/data/outputs/save",
"outdir_video": "/mnt/data/outputs/video",
"outdir_init_images": "/mnt/data/outputs/init-images",
"outdir_txt2img_grids": "/mnt/data/outputs/grids",
"outdir_img2img_grids": "/mnt/data/outputs/grids",
"outdir_control_grids": "/mnt/data/outputs/grids",
"diffusers_version": "8adc6003ba4dbf5b61bb4f1ce571e9e55e145a99",
"sd_checkpoint_hash": null,
"huggingface_token": "hf_PUT-HERE-YOUR-HuggingFace-Token",
"samples_filename_pattern": "[seq]-[date]-[model_name]-[heightwidth]x[widthheight]-STEP[steps]-CFG[cfg]-Seed[seed]"
} |
...