-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yaml
54 lines (47 loc) · 1.16 KB
/
docker-compose.yaml
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
version: "3.7"
services:
api:
image: ys2lee/stable-diffusion-api:${TAG:-latest}
build:
context: .
dockerfile: docker/api/Dockerfile
restart: unless-stopped
ports:
- 3000:3000
expose:
- 3000
volumes:
- /home/{USERNAME}/.cache/huggingface:/root/.cache/huggingface
- ./static:/app/static
environment:
MODEL_ID: "CompVis/stable-diffusion-v1-4"
MB_BATCH_SIZE: 1
CUDA_DEVICE: cuda
HUGGINGFACE_TOKEN: ${TOKEN:-YOUR-HUGGINGFACE-ACCESS-TOKEN}
IMAGESERVER_URL: http://localhost:3000/images
MB_TIMEOUT: 120
SAVE_DIR: static
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ gpu ]
frontend:
depends_on:
- api
image: ys2lee/stable-diffusion-streamlit:${TAG:-latest}
build:
context: ./frontend
dockerfile: ../docker/frontend/Dockerfile
restart: unless-stopped
ports:
- 8501:8501
expose:
- 8501
environment:
TZ: Asia/Seoul
API_URL: http://api:3000
ST_TITLE: Stable-diffusion
ST_WIDE: "True"