-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.dev.yml
109 lines (100 loc) · 2.65 KB
/
docker-compose.dev.yml
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
x-app: &default-app
image: radis_dev:latest
volumes:
- .:/app
- vscode-server:/root/.vscode-server/extensions
- vscode-server-insiders:/root/.vscode-server-insiders/extensions
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}
pull_policy: never
x-llamacpp: &llamacpp
environment:
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
LLAMA_CACHE: "/models"
NO_PROXY: ${NO_PROXY:-}
hostname: llamacpp.local
volumes:
- models_data:/models
services:
init:
<<: *default-app
profiles:
- never
web:
<<: *default-app
build:
target: development
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} &&
wait-for-it -s llamacpp.local:8080 -t 60 &&
./manage.py runserver 0.0.0.0:8000
"
default_worker:
<<: *default-app
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
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"
llamacpp_cpu:
<<: *llamacpp
image: ghcr.io/ggerganov/llama.cpp:server
entrypoint: []
command: >
bash -c "
/llama-server \\
--model-url ${LLM_MODEL_URL} \\
--host 0.0.0.0 \\
--port 8080 \\
--ctx-size 4096
"
profiles: ["cpu"]
llamacpp_gpu:
<<: *llamacpp
image: ghcr.io/ggerganov/llama.cpp:server-cuda
entrypoint: []
command: >
bash -c "
/llama-server \\
--model-url ${LLM_MODEL_URL} \\
--host 0.0.0.0 \\
--port 8080 \\
--ctx-size 4096 \\
--gpu-layers 99
"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
profiles: ["gpu"]
volumes:
models_data:
vscode-server:
vscode-server-insiders: