-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.it-tests.yml
More file actions
60 lines (57 loc) · 1.52 KB
/
docker-compose.it-tests.yml
File metadata and controls
60 lines (57 loc) · 1.52 KB
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
services:
api:
build:
context: .
dockerfile: Dockerfile.api
tty: true
stdin_open: true
ports:
- "5000:5000"
volumes:
- storage:/STORAGE
environment:
- PYTHONUNBUFFERED=1
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- DDIFFUSION_ADMIN_KEY=${DDIFFUSION_ADMIN_KEY}
- DDIFFUSION_STORAGE_ADDRESS=${DDIFFUSION_STORAGE_ADDRESS:-http://127.0.0.1:5000}
- FASTMCP_EXPERIMENTAL_ENABLE_NEW_OPENAPI_PARSER=true
healthcheck:
test:
["CMD-SHELL", "wget -q --spider http://127.0.0.1:5000/health || exit 1"]
start_period: 3s
redis:
image: redis:latest
ports:
- "6379:6379"
cpu-workers:
command: celery -A worker worker --concurrency=4 --loglevel=info -Q cpu
build:
context: .
dockerfile: Dockerfile.workers
image: deferred-diffusion-workers
tty: true
stdin_open: true
volumes:
- hf_cache:/WORKSPACE
- storage:/STORAGE
environment:
- PYTHONUNBUFFERED=1
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- CELERYD_PREFETCH_MULTIPLIER=1
- OPENAI_API_KEY=${OPENAI_API_KEY}
- REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN}
- HF_TOKEN=${HF_TOKEN}
- HF_HOME=/WORKSPACE
- TORCH_HOME=/WORKSPACE
depends_on:
- redis
- api
deploy:
replicas: 1
volumes:
hf_cache:
name: deferred-diffusion_hf_cache
storage:
name: deferred-diffusion_storage