-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathdocker-compose.lab.yml
More file actions
48 lines (43 loc) · 1.38 KB
/
Copy pathdocker-compose.lab.yml
File metadata and controls
48 lines (43 loc) · 1.38 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
name: spire-codex-lab
# The analytics lab: extraction + DuckDB, fully separate from the prod stack.
# Nothing here runs continuously — both services are one-shot `compose run`
# targets, memory-capped so they can never starve the site.
#
# docker compose -f docker-compose.lab.yml run --rm extract
# docker compose -f docker-compose.lab.yml run --rm duckdb /lake/build.duckdb -c ".read /lake/lab/build.sql"
# docker compose -f docker-compose.lab.yml run --rm duckdb -c "SELECT ... FROM read_parquet('/lake/runs.parquet')"
services:
extract:
image: ptrlrd/spire-codex-backend:latest
entrypoint: ["python", "/lab/extract.py"]
env_file: .env
mem_limit: 1500m
volumes:
- ./lab:/lab:ro
- ./data:/data:ro
- ./lake:/lake
networks:
- nginx_web-network
shadow:
image: ptrlrd/spire-codex-backend:latest
entrypoint: ["python", "/lab/shadow_diff.py"]
env_file: .env
mem_limit: 512m
volumes:
- ./lab:/lab:ro
- ./lake:/lake:ro
networks:
- nginx_web-network
duckdb:
image: duckdb/duckdb:1.5.5
entrypoint: ["duckdb"]
# 5g: the single-parse build holds 3.5g inside duckdb plus native
# overhead (2g and 3g both got memcg-killed on earlier designs).
mem_limit: 5g
working_dir: /lake
volumes:
- ./lab:/lake/lab:ro
- ./lake:/lake
networks:
nginx_web-network:
external: true