mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-01-10 02:29:59 +01:00
Refactor Dockerfile and docker-compose for ROCm support and improved build context Refactor docker-compose.yml for improved service configuration and organization
108 lines
2.1 KiB
YAML
108 lines
2.1 KiB
YAML
# Base configurations
|
|
x-common: &common
|
|
ports:
|
|
- "${WEBUI_PORT:-7860}:7860"
|
|
volumes:
|
|
- &v1 ./data:/data
|
|
- &v2 ./output:/output
|
|
stop_signal: SIGKILL
|
|
tty: true
|
|
|
|
# Device configurations
|
|
x-cuda: &cuda
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
device_ids: ['0']
|
|
capabilities: [compute, utility]
|
|
|
|
x-rocm: &rocm
|
|
devices:
|
|
- /dev/kfd
|
|
- /dev/dri
|
|
security_opt:
|
|
- seccomp=unconfined
|
|
group_add:
|
|
- video
|
|
deploy:
|
|
# resources:
|
|
reservations:
|
|
devices:
|
|
- driver: amd
|
|
capabilities: [gpu]
|
|
environment:
|
|
- ROCm_VERSION=6.4
|
|
- HIP_VISIBLE_DEVICES=0
|
|
- HSA_OVERRIDE_GFX_VERSION=11.0.0
|
|
|
|
x-cpu: &cpu
|
|
deploy: {}
|
|
|
|
# CLI arguments
|
|
x-auto-args: &auto_args
|
|
CLI_ARGS: --allow-code --medvram --xformers --enable-insecure-extension-access --api
|
|
|
|
x-auto-cpu-args: &auto_cpu_args
|
|
CLI_ARGS: --no-half --precision full --allow-code --enable-insecure-extension-access --api
|
|
|
|
x-comfy-args: &comfy_args
|
|
CLI_ARGS: ""
|
|
|
|
x-comfy-cpu-args: &comfy_cpu_args
|
|
CLI_ARGS: --cpu
|
|
|
|
name: webui-docker
|
|
|
|
services:
|
|
download:
|
|
build: ./services/download/
|
|
profiles: ["download"]
|
|
volumes:
|
|
- *v1
|
|
|
|
# AUTOMATIC1111 services
|
|
auto-cuda:
|
|
<<: [*common, *cuda]
|
|
profiles: ["auto-cuda"]
|
|
build: ./services/AUTOMATIC1111
|
|
image: sd-auto:79
|
|
environment:
|
|
<<: *auto_args
|
|
|
|
auto-rocm:
|
|
<<: [*common, *rocm]
|
|
profiles: ["auto-rocm"]
|
|
build:
|
|
context: ./services/AUTOMATIC1111
|
|
dockerfile: Dockerfile-rocm
|
|
image: sd-auto-rocm:79
|
|
environment:
|
|
<<: *auto_args
|
|
|
|
auto-cpu:
|
|
<<: [*common, *cpu]
|
|
profiles: ["auto-cpu"]
|
|
build: ./services/AUTOMATIC1111
|
|
image: sd-auto-cpu:79
|
|
environment:
|
|
<<: *auto_cpu_args
|
|
|
|
# ComfyUI services
|
|
comfy-cuda:
|
|
<<: [*common, *cuda]
|
|
profiles: ["comfy-cuda"]
|
|
build: ./services/comfy/
|
|
image: sd-comfy:7
|
|
environment:
|
|
<<: *comfy_args
|
|
|
|
comfy-cpu:
|
|
<<: [*common, *cpu]
|
|
profiles: ["comfy-cpu"]
|
|
build: ./services/comfy/
|
|
image: sd-comfy-cpu:7
|
|
environment:
|
|
<<: *comfy_cpu_args
|