-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (113 loc) · 2.96 KB
/
docker-compose.yml
File metadata and controls
120 lines (113 loc) · 2.96 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: "3.9"
services:
postgres:
image: pgvector/pgvector:pg16
restart: unless-stopped
environment:
POSTGRES_DB: cell_state_compiler
POSTGRES_USER: cellcompiler
POSTGRES_PASSWORD: cellcompiler
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cellcompiler -d cell_state_compiler"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis-data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: ./apps/api
dockerfile: Dockerfile
restart: unless-stopped
env_file: .env
environment:
DATABASE_URL: postgresql+psycopg2://cellcompiler:cellcompiler@postgres:5432/cell_state_compiler
REDIS_URL: redis://redis:6379/0
GENOME_MODEL_SERVICE_URL: http://genome-model-service:8100
ports:
- "8000:8000"
volumes:
- ./data/uploads:/app/uploads
- ./data/demo_sequences:/app/data/demo_sequences:ro
- ./scripts:/scripts:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 15
command: >
sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 2"
worker:
build:
context: ./apps
dockerfile: worker/Dockerfile
restart: unless-stopped
env_file: .env
environment:
DATABASE_URL: postgresql+psycopg2://cellcompiler:cellcompiler@postgres:5432/cell_state_compiler
REDIS_URL: redis://redis:6379/0
GENOME_MODEL_SERVICE_URL: http://genome-model-service:8100
volumes:
- ./data/uploads:/app/uploads
- ./data/demo_sequences:/app/data/demo_sequences:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: python worker.py
genome-model-service:
build:
context: ./apps/genome-model-service
dockerfile: Dockerfile
restart: unless-stopped
env_file: .env
environment:
EVO2_PROVIDER: local
EVO2_MODEL_NAME: evo2_1b_base
EVO2_DEVICE: cpu
ports:
- "8100:8100"
volumes:
- evo2-model-cache:/root/.cache/evo2
- hf-model-cache:/root/.cache/huggingface
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8100/health"]
interval: 20s
timeout: 15s
retries: 10
web:
build:
context: ./apps/web
dockerfile: Dockerfile
restart: unless-stopped
environment:
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000/api/v1
ports:
- "3000:3000"
depends_on:
- api
volumes:
pgdata:
redis-data:
evo2-model-cache:
hf-model-cache: