-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
112 lines (103 loc) · 2.68 KB
/
docker-compose.dev.yml
File metadata and controls
112 lines (103 loc) · 2.68 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
x-app: &default-app
build:
target: development
pull_policy: build
environment:
DJANGO_INTERNAL_IPS: ${DJANGO_INTERNAL_IPS:?}
DJANGO_SETTINGS_MODULE: radis.settings.development
FORCE_DEBUG_TOOLBAR: ${FORCE_DEBUG_TOOLBAR:-true}
REMOTE_DEBUGGING_ENABLED: ${REMOTE_DEBUGGING_ENABLED:-false}
REMOTE_DEBUGGING_PORT: ${REMOTE_DEBUGGING_PORT:-5678}
develop:
watch:
- action: sync
path: .
target: /app
ignore:
- .git/
- .venv/
- node_modules/
- action: rebuild
path: ./pyproject.toml
x-llm: &llm
hostname: llm.local
ports:
- ${LLM_SERVICE_DEV_PORT:-8080}:8080
environment:
HF_TOKEN: ${HF_TOKEN:-}
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
LLAMA_ARG_HF_REPO: ${LLM_MODEL_NAME}
LLAMA_ARG_CTX_SIZE: 8192
LLAMA_ARG_N_PARALLEL: 2
LLAMA_ARG_ENDPOINT_METRICS: 1
LLAMA_ARG_PORT: 8080
LLAMA_ARG_N_GPU_LAYERS: 99
NO_PROXY: ${NO_PROXY:-}
volumes:
- models_data:/models
services:
init:
<<: *default-app
profiles:
- never
web:
<<: *default-app
image: radis_dev-web:latest
ports:
- ${WEB_DEV_PORT:-8000}:8000
- ${REMOTE_DEBUGGING_PORT:-5678}:5678
command: >
bash -c "
wait-for-it -s postgres.local:5432 -t 60 &&
./manage.py migrate &&
./manage.py create_superuser &&
./manage.py create_example_users &&
./manage.py create_example_groups &&
./manage.py populate_example_reports --lng ${EXAMPLE_REPORTS_LANGUAGE:-en} &&
./manage.py retry_stalled_jobs &&
./manage.py runserver 0.0.0.0:8000
"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
default_worker:
<<: *default-app
image: radis_dev-default_worker:latest
command: >
bash -c "
wait-for-it -s postgres.local:5432 -t 60 &&
./manage.py bg_worker -l debug -q default --autoreload
"
llm_worker:
<<: *default-app
image: radis_dev-llm_worker:latest
command: >
bash -c "
wait-for-it -s postgres.local:5432 -t 60 &&
./manage.py bg_worker -l debug -q llm --autoreload
"
postgres:
environment:
POSTGRES_PASSWORD: postgres
ports:
- ${POSTGRES_DEV_PORT:-5432}:5432
llm_cpu:
<<: *llm
image: ghcr.io/ggml-org/llama.cpp:server-b5170
profiles:
- cpu
llm_gpu:
<<: *llm
image: ghcr.io/ggml-org/llama.cpp:server-cuda-b5170
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities:
- gpu
profiles:
- gpu
volumes:
models_data: