-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
40 lines (39 loc) · 1.06 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
services:
# An old issue: docker-compose will mount volume as root.
# Workaround: https://github.com/docker/compose/issues/3270
# (Command 'docker run -v' is fine)
file-chown:
container_name: file-chown
build:
context: .
dockerfile: Dockerfile
image: "yanwk/sd-webui-base"
user: "root"
volumes:
- "./storage:/home/runner"
command: "chown -R runner:runner /home/runner"
stable-diffusion:
container_name: sd-webui
depends_on:
file-chown:
condition: service_completed_successfully
build:
context: .
dockerfile: Dockerfile
image: "yanwk/sd-webui-base"
ports:
- "7860:7860"
volumes:
- "./storage:/home/runner"
environment:
- CLI_ARGS=--xformers --medvram --allow-code --api --enable-insecure-extension-access
security_opt:
- "label=type:nvidia_container_t"
stop_signal: SIGINT
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [gpu]