Skip to content

Conversation

gafda
Copy link

@gafda gafda commented Aug 26, 2025

This pull request introduces significant updates to the Docker setup for Stable Diffusion web UI services, with a focus on improving hardware compatibility, updating dependencies, and refactoring service definitions. The changes include upgrading base images and software versions, adding support for AMD ROCm devices, and restructuring the docker-compose.yml file to better organize service configurations for CUDA, ROCm, and CPU environments.

Hardware compatibility and service configuration:

  • Added ROCm (AMD GPU) support with a new auto-rocm service and corresponding Dockerfile-rocm, including device, environment, and build settings for ROCm hardware. [1] [2]
  • Refactored docker-compose.yml to split service definitions by hardware type (CUDA, ROCm, CPU) and grouped CLI arguments for each, improving maintainability and clarity. [1] [2]

Dependency and version updates:

  • Updated base images and Python dependencies for all services, including the upgrade of PyTorch to 2.5.1 (CUDA) and 2.6.0 (ROCm), and bumping the Stable Diffusion web UI to version 1.10.1. [1] [2] [3] [4]
  • Upgraded the Alpine Git and Bash images used for downloads and utility containers to newer versions for improved security and compatibility. [1] [2]

General improvements and bug fixes:

  • Improved robustness of Gradio patching by searching for routes.py files dynamically and applying changes, with added error handling. [1] [2]
  • Updated image tags and build contexts to reflect new versions and configurations for each service profile.

…grades

Refactor Dockerfile and docker-compose for ROCm support and improved build context
Refactor docker-compose.yml for improved service configuration and organization
group_add:
- video
deploy:
# resources:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i had to uncomment this to run the profile

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@pcting
Copy link

pcting commented Sep 11, 2025

i'm getting this error on my machine:

$ docker compose --profile auto-rocm up --build -d 
...
[+] Running 1/2
 ✔ sd-auto-rocm:79                     Built                                                                              0.0s 
 ⠙ Container webui-docker-auto-rocm-1  Starting                                                                           0.1s 
DEBU[0000] otel error                                    error="<nil>"
DEBU[0000] otel error                                    error="<nil>"
Error response from daemon: could not select device driver "amd" with capabilities: [[gpu]]

any thoughts?

@gafda
Copy link
Author

gafda commented Sep 12, 2025

i'm getting this error on my machine:

$ docker compose --profile auto-rocm up --build -d 
...
[+] Running 1/2
 ✔ sd-auto-rocm:79                     Built                                                                              0.0s 
 ⠙ Container webui-docker-auto-rocm-1  Starting                                                                           0.1s 
DEBU[0000] otel error                                    error="<nil>"
DEBU[0000] otel error                                    error="<nil>"
Error response from daemon: could not select device driver "amd" with capabilities: [[gpu]]

any thoughts?

That is a weird error. I'll try to look into it.

Meanwhile, did you update the env vars to match your system:

    - ROCm_VERSION=6.4
    - HIP_VISIBLE_DEVICES=0
    - HSA_OVERRIDE_GFX_VERSION=11.0.0

Comment on lines +10 to +13
RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9
RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git ab527a9a6d347f364e3d185ba6d714e22d80cb3c
RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2cf03aaf6e704197fd0dae7c7f96aa59cf1b11c9
RUN . /clone.sh generative-models https://github.com/Stability-AI/generative-models 45c443b316737a4ab6e40413d7794a7f5657c19f
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9
RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git ab527a9a6d347f364e3d185ba6d714e22d80cb3c
RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2cf03aaf6e704197fd0dae7c7f96aa59cf1b11c9
RUN . /clone.sh generative-models https://github.com/Stability-AI/generative-models 45c443b316737a4ab6e40413d7794a7f5657c19f
RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 3a29b7410476bf5f2ba0955827390eb6ea1f4f9d
RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git ab527a9a6d347f364e3d185ba6d714e22d80cb3c
RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2cf03aaf6e704197fd0dae7c7f96aa59cf1b11c9
RUN . /clone.sh generative-models https://github.com/Stability-AI/generative-models bc07ce62c179d3aab3053a623d96a071101d11cb

Comment on lines +57 to +60
pip install pyngrok xformers==0.0.26.post1 \
git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
git+https://github.com/mlfoundations/[email protected]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pip install pyngrok xformers==0.0.26.post1 \
git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
git+https://github.com/mlfoundations/[email protected]
pip install pyngrok xformers==0.0.28 \
git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
git+https://github.com/mlfoundations/[email protected]
RUN pip install --upgrade --force-reinstall numpy scikit-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants