-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (53 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
57 lines (53 loc) · 1.5 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
version: '3.8'
services:
# 基础服务 - 功能测试
sage-bench-basic:
build:
context: .
dockerfile: Dockerfile
container_name: sage-bench-basic
volumes:
- ./results:/app/results
- ./raw_data:/app/raw_data
- ./logs:/app/logs
environment:
- PYTHONUNBUFFERED=1
- OMP_NUM_THREADS=4
command: bash -c "python tests/test_streaming.py"
# 开发服务 - 交互式
sage-bench-dev:
build:
context: .
dockerfile: Dockerfile
container_name: sage-bench-dev
volumes:
- ./results:/app/results
- ./raw_data:/app/raw_data
- ./logs:/app/logs
- .:/app # 挂载源代码用于开发
environment:
- PYTHONUNBUFFERED=1
- OMP_NUM_THREADS=4
stdin_open: true
tty: true
command: /bin/bash
# 性能测试服务 - 需要权限
sage-bench-perf:
build:
context: .
dockerfile: Dockerfile
container_name: sage-bench-perf
volumes:
- ./results:/app/results
- ./raw_data:/app/raw_data
- ./logs:/app/logs
environment:
- PYTHONUNBUFFERED=1
- OMP_NUM_THREADS=8
# 注意:性能测试建议直接在宿主机运行
privileged: true # 需要访问性能计数器
command: bash -c "python run_experiments.py --config runbooks/baseline.yaml"
# 使用示例:
# docker-compose up sage-bench-basic # 运行基础测试
# docker-compose run sage-bench-dev # 进入开发环境
# docker-compose up sage-bench-perf # 运行性能测试