-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
114 lines (109 loc) · 4.11 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
114 lines (109 loc) · 4.11 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
services:
natkit-v0-bridge:
image: natkit-bridge:dev
build:
context: ./libnatkit
dockerfile: Dockerfile_libnatkit_bridge
args:
NATKIT_CMAKE_BUILD_PARALLEL: ${NATKIT_CMAKE_BUILD_PARALLEL:-}
natkit-v0-backend:
image: natkit-backend:dev
build:
context: ./libnatkit
dockerfile: Dockerfile_natkit_backend
args:
NATKIT_CMAKE_BUILD_PARALLEL: ${NATKIT_CMAKE_BUILD_PARALLEL:-}
environment:
# Share one auth session DB with the ML control-plane so a natkit_session
# cookie issued at login validates on the control-plane's WebSocket.
NATKIT_AUTH_DB_PATH: /auth/auth.sqlite3
# Phase 5: the backend is the sole client of the ML control plane and
# proxies it over /ws/stream_viewer (browser no longer hits :8786 directly).
NATKIT_ML_CONTROL_PLANE_URL: ws://natkit-v0-ml-control-plane:8786
# Persist saved stream graphs on a named volume so they survive container
# recreate (the default ./data/stream_graphs.json lives in the ephemeral
# container layer and is lost on `down`/rebuild).
NATKIT_STREAM_GRAPH_STORE: /graphs/stream_graphs.json
volumes:
- natkit-v0-auth:/auth
- natkit-v0-graphs:/graphs
# Read trained models the control plane persists here (Phase 5, slice C)
# so a classify node can load model_path directly.
- natkit-v0-models:/models:ro
natkit-v0-ml-control-plane:
image: natkit-ml-control-plane:dev
build:
context: .
dockerfile: Dockerfile_natkit_ml_control_plane
args:
NATKIT_CMAKE_BUILD_PARALLEL: ${NATKIT_CMAKE_BUILD_PARALLEL:-}
restart: always
environment:
NATKIT_ML_CONTROL_PLANE_BROKER: ${NATKIT_ML_CONTROL_PLANE_BROKER:-natkit-v0-kafka:9092}
NATKIT_ML_CONTROL_PLANE_WORKER_THREADS: ${NATKIT_ML_CONTROL_PLANE_WORKER_THREADS:-}
NATKIT_ML_CONTROL_PLANE_MAX_WORKER_RESTART_ATTEMPTS: ${NATKIT_ML_CONTROL_PLANE_MAX_WORKER_RESTART_ATTEMPTS:-}
# Same auth DB as natkit-v0-backend (see above) so login sessions resolve here.
NATKIT_AUTH_DB_PATH: /auth/auth.sqlite3
# Persist trained models to the shared volume the backend reads (slice C).
NATKIT_ML_ARTIFACTS_DIR: /models
ports:
- "8786:8786"
volumes:
- ./uploads/ml-control-plane:/state:Z
- natkit-v0-auth:/auth
- natkit-v0-models:/models
networks:
- natkit-v0-kafka-network
depends_on:
- natkit-v0-kafka
natkit-v0-ml-worker-a:
image: natkit-ml-control-plane:dev
command:
- python
- /workspace/libnatkit/scripts/natkit_ml_worker.py
- --control-plane-url
- ${NATKIT_ML_WORKER_CONTROL_PLANE_URL:-ws://natkit-v0-ml-control-plane:8786}
- --worker-id
- ${NATKIT_ML_WORKER_ID_A:-worker-remote-a}
- --worker-threads
- "${NATKIT_ML_WORKER_THREADS_A:-4}"
- --scratch-root
- /state/scratch
restart: always
environment:
# The worker authenticates to the shared auth store by logging in against
# the backend's /api/auth/login. derive_auth_base_url() would point this at
# the control-plane host (which doesn't serve auth) in this topology, so set
# it explicitly to the backend. Credentials come from .env and must match a
# real account (see NATKIT_ML_WORKER_AUTH_* there).
NATKIT_AUTH_BASE_URL: http://natkit-v0-backend:7409
NATKIT_AUTH_USERNAME: ${NATKIT_ML_WORKER_AUTH_USERNAME:-}
NATKIT_AUTH_PASSWORD: ${NATKIT_ML_WORKER_AUTH_PASSWORD:-}
volumes:
- ./uploads/ml-worker-a:/state:Z
networks:
- natkit-v0-kafka-network
depends_on:
- natkit-v0-ml-control-plane
natkit-v0-frontend:
image: natkit-frontend:dev
build:
context: ./frontend
dockerfile: Dockerfile.dev
restart: always
environment:
VITE_DEV_BACKEND_URL: http://natkit-v0-backend:7409
ports:
- "8080:5173"
volumes:
- ./frontend:/app:Z
- natkit-v0-frontend-node-modules:/app/node_modules
networks:
- natkit-v0-kafka-network
depends_on:
- natkit-v0-backend
volumes:
natkit-v0-auth:
natkit-v0-graphs:
natkit-v0-frontend-node-modules:
natkit-v0-models: