-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.gpu.yml
More file actions
128 lines (120 loc) · 3.28 KB
/
compose.gpu.yml
File metadata and controls
128 lines (120 loc) · 3.28 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
121
122
123
124
125
126
127
128
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
args:
- GIT_COMMIT_HASH=${GIT_COMMIT_HASH}
image: ghcr.io/katherlab/llmaixweb-backend-gpu:latest
env_file: .env
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- DISABLE_CELERY=false
- INITIALIZE_CELERY=${INITIALIZE_CELERY:-false}
- REQUIRE_INVITATION=${REQUIRE_INVITATION:-false}
ports: ["8000:8000"]
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
rustfs:
condition: service_healthy
rustfs-init:
condition: service_completed_successfully
worker_default:
image: ghcr.io/katherlab/llmaixweb-backend-gpu:latest
env_file: .env
command: >
/app/.venv/bin/python -m celery -A backend.src.celery.celery_config
worker -Q default -c 4 --loglevel=info
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
depends_on: [backend]
worker_preprocess:
image: ghcr.io/katherlab/llmaixweb-backend-gpu:latest
env_file: .env
command: >
/app/.venv/bin/python -m celery -A backend.src.celery.celery_config
worker -Q preprocess -c 1 --loglevel=info
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
depends_on: [backend]
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
args:
- GIT_COMMIT_HASH=${GIT_COMMIT_HASH:-$(git rev-parse --short HEAD)}
image: ghcr.io/katherlab/llmaixweb-frontend:latest
environment:
- VITE_API_BACKEND_URL=${VITE_API_BACKEND_URL:-http://localhost:8000/api/v1}
ports: ["5173:8080"]
depends_on: [backend]
postgres:
image: postgres:18-alpine
env_file: .env
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:8-alpine
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
rustfs:
image: rustfs/rustfs:1.0.0-alpha.99
command: server /data --console-address ":9001"
env_file: .env
volumes:
- minio-data:/data
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:9000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
rustfs-init:
image: rustfs/rc:latest
depends_on:
rustfs:
condition: service_healthy
env_file: .env
entrypoint: >
/bin/sh -c "
until mc alias set local http://rustfs:9000 ${RUSTFS_ACCESS_KEY} ${RUSTFS_SECRET_KEY}; do
sleep 3;
done;
mc mb -p local/${S3_BUCKET_NAME} || true;
mc anonymous set download local/${S3_BUCKET_NAME} || true;
echo 'Bucket '${S3_BUCKET_NAME}' ready';
"
restart: "no"
volumes:
pgdata:
redis-data:
minio-data: