generated from jim60105/Dockerfile-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
69 lines (68 loc) · 1.92 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
services:
stable-diffusion-webui:
container_name: stable-diffusion-webui
image: ghcr.io/jim60105/stable-diffusion-webui:v1.10.1
user: "1001:0"
build:
context: .
target: final
args:
- UID=1001
# - SKIP_REQUIREMENTS_INSTALL=true
cache_from:
- ghcr.io/jim60105/stable-diffusion-webui:cache
cache_to:
- type=inline
command:
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/cmd_args.py
#
# Already configured in the entrypoint and should remain unchanged!!
# --listen --port 7860 --data-dir /data
#
# Recommanded:
- --xformers
- --api
- --allow-code
- --no-half-vae
#
# You may or may not need:
## Enable installing/modifying extensions from the UI, please pay attention to security considerations.
- --enable-insecure-extension-access
#
## Optimizations
## https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Optimizations
# - --lowvram
# - --medvram
- --opt-sdp-attention
- --opt-sdp-no-mem-attention
- --opt-split-attention
- --opt-channelslast
#
## Debug logging
# - --loglevel
# - DEBUG
# - --log-startup
ports:
- 7860:7860
environment:
# Use the volume to get better performance then bind mount.
# And users should not touch these files in general.
- SD_WEBUI_CACHE_FILE=/.cache/cache.json
- SD_WEBUI_CACHE_DIR=/.cache
tmpfs:
- /tmp
volumes:
- cache:/.cache
- repositories:/app/repositories
- ./data:/data
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
count: all
volumes:
cache:
repositories: