Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
154 lines (147 loc) · 5.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
154 lines (147 loc) · 5.64 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
services:
mocap:
build:
context: .
dockerfile: ./docker/Dockerfile
image: isr/mct_acquisition
tty: true
stdin_open: true
environment:
REACT_APP_BASE_URL: ${REACT_APP_BASE_URL:-localhost}
PYTHONUNBUFFERED: 1
DEPLOYMENT_MODE: ${DEPLOYMENT_MODE:-network}
NETWORK_INTERFACE: ${NETWORK_INTERFACE:-enp5s0}
DHCP_LEASE_FILE: ${DHCP_LEASE_FILE:-/var/lib/dhcp/dhcpd.leases}
DISK_SPACE_WARNING_THRESHOLD_GB: ${DISK_SPACE_WARNING_THRESHOLD_GB:-50}
HEALTH_IDLE_POLL_S: ${HEALTH_IDLE_POLL_S:-30}
# DataJoint credentials. DataJoint reads DJ_HOST/DJ_USER/DJ_PASS natively and
# they override the baked /root/.datajoint_config.json, so creds live in .env
# instead of the image. database.port is not env-driven; it stays in the config file.
DJ_HOST: ${DJ_HOST}
DJ_USER: ${DJ_USER}
DJ_PASS: ${DJ_PASS}
volumes:
- ${DATA_VOLUME:-/data}:/data
- ${CAMERA_CONFIGS:-/camera_configs}:/configs
- /etc/localtime:/etc/localtime:ro
- /var/lib/dhcp:/var/lib/dhcp:ro
- ${DATAJOINT_EXTERNAL:-/mnt/datajoint_external}:/datajoint_external
network_mode: host
command: /Mocap/entrypoints/start_acquisition_gui.sh
mocap-test:
build:
context: .
dockerfile: ./docker/Dockerfile
image: isr/mct_acquisition
tty: true
stdin_open: true
environment:
REACT_APP_BASE_URL: ${REACT_APP_BASE_URL:-localhost}
REACT_APP_TEST_MODE: "true"
PYTHONUNBUFFERED: 1
DEPLOYMENT_MODE: ${DEPLOYMENT_MODE:-network}
NETWORK_INTERFACE: ${NETWORK_INTERFACE:-enp5s0}
DHCP_LEASE_FILE: ${DHCP_LEASE_FILE:-/var/lib/dhcp/dhcpd.leases}
DISK_SPACE_WARNING_THRESHOLD_GB: ${DISK_SPACE_WARNING_THRESHOLD_GB:-50}
HEALTH_IDLE_POLL_S: ${HEALTH_IDLE_POLL_S:-30}
# DataJoint credentials. DataJoint reads DJ_HOST/DJ_USER/DJ_PASS natively and
# they override the baked /root/.datajoint_config.json, so creds live in .env
# instead of the image. database.port is not env-driven; it stays in the config file.
DJ_HOST: ${DJ_HOST}
DJ_USER: ${DJ_USER}
DJ_PASS: ${DJ_PASS}
volumes:
- ${TEST_DATA_VOLUME:-/data-test}:/data
- ${CAMERA_CONFIGS:-/camera_configs}:/configs
- /etc/localtime:/etc/localtime:ro
- /var/lib/dhcp:/var/lib/dhcp:ro
- ${DATAJOINT_EXTERNAL:-/mnt/datajoint_external}:/datajoint_external
network_mode: host
command: /Mocap/entrypoints/start_acquisition_gui.sh
test:
image: isr/mct_acquisition
command: /Mocap/entrypoints/run_tests.sh
environment:
PYTHONUNBUFFERED: 1
DEPLOYMENT_MODE: ${DEPLOYMENT_MODE:-network}
NETWORK_INTERFACE: ${NETWORK_INTERFACE:-enp5s0}
DHCP_LEASE_FILE: ${DHCP_LEASE_FILE:-/var/lib/dhcp/dhcpd.leases}
DISK_SPACE_WARNING_THRESHOLD_GB: ${DISK_SPACE_WARNING_THRESHOLD_GB:-50}
HEALTH_IDLE_POLL_S: ${HEALTH_IDLE_POLL_S:-30}
volumes:
- ${DATA_VOLUME:-/data}:/data
- ${CAMERA_CONFIGS:-/camera_configs}:/configs
- /etc/localtime:/etc/localtime:ro
- /var/lib/dhcp:/var/lib/dhcp:ro
- ${DATAJOINT_EXTERNAL:-/mnt/datajoint_external}:/datajoint_external
- ./tests:/Mocap/tests
- ./tests/testdata:/Mocap/tests/testdata
- ./scripts:/Mocap/scripts
network_mode: host
reset:
image: isr/mct_acquisition
command: /Mocap/entrypoints/run_reset.sh
volumes:
- ${CAMERA_CONFIGS:-/camera_configs}:/configs
- /etc/localtime:/etc/localtime:ro
network_mode: host
annotate:
build:
context: .
dockerfile: ./docker/Dockerfile.annotation
image: isr/mct_annotation
tty: true
stdin_open: true
environment:
REACT_APP_BASE_URL: ${REACT_APP_BASE_URL:-localhost}
PYTHONUNBUFFERED: 1
volumes:
- /etc/localtime:/etc/localtime:ro
- ${DATAJOINT_EXTERNAL:-/mnt/datajoint_external}:/datajoint_external
network_mode: host
# Local test DataJoint MySQL — safe upload target that mirrors production engine.
# Binds only to localhost:3307. Data persists in the datajoint_test_db named volume.
# Password defaults to 'djtest'; override with DJ_TEST_PASS (also update datajoint_config.test.json).
# Run via: make run-mocap-test-dj (starts this container automatically)
datajoint-test:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: ${DJ_TEST_PASS:-djtest}
MYSQL_ROOT_HOST: '%'
ports:
- "127.0.0.1:3307:3306"
volumes:
- datajoint_test_db:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# mocap-test variant that uploads to the local datajoint-test MySQL instead of production.
# Uses TEST_DATA_VOLUME for recording data and TEST_DJ_EXTERNAL for DataJoint external storage.
# Run via: make run-mocap-test-dj (waits for datajoint-test to be healthy before starting)
mocap-test-dj:
build:
context: .
dockerfile: ./docker/Dockerfile
image: isr/mct_acquisition
tty: true
stdin_open: true
depends_on:
datajoint-test:
condition: service_healthy
environment:
REACT_APP_BASE_URL: ${REACT_APP_BASE_URL:-localhost}
REACT_APP_TEST_MODE: "true"
PYTHONUNBUFFERED: 1
volumes:
- ${TEST_DATA_VOLUME:-/data-test}:/data
- ${CAMERA_CONFIGS:-/camera_configs}:/configs
- /etc/localtime:/etc/localtime:ro
- ${TEST_DJ_EXTERNAL:-/tmp/datajoint_external_test}:/datajoint_external
- ./docker/datajoint_config.test.json:/root/.datajoint_config.json:ro
network_mode: host
command: /Mocap/entrypoints/start_acquisition_gui.sh
volumes:
datajoint_test_db: