-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
116 lines (91 loc) · 3.3 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
116 lines (91 loc) · 3.3 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
services:
# 測試資料庫查詢界面
opensearch-sql-test:
build:
context: .
dockerfile: Dockerfile
container_name: opensearch-sql-test
ports:
- "5012:5002" # 使用不同的 port 避免衝突
volumes:
# Azure OpenAI 配置
- ./azure_openai_config.py:/app/azure_openai_config.py:ro
# testDB 的 Few-shot 配置
- ./testDB/fewshot:/app/testDB/fewshot
# testDB 的資料庫描述文件
- ./testDB/dev/dev_databases/testDB/database_description:/app/testDB/dev/dev_databases/testDB/database_description
# testDB 的資料集配置
- ./testDB/dev/dev.json:/app/testDB/dev/dev.json
- ./testDB/dev/tables.json:/app/testDB/dev/tables.json
- ./testDB/db_schema.json:/app/testDB/db_schema.json
# testDB 的資料庫文件
- ./testDB/dev/dev_databases/testDB/testDB.sqlite:/app/testDB/dev/dev_databases/testDB/testDB.sqlite
# testDB 的 Embedding 文件
- ./testDB/emb:/app/testDB/emb
# 日誌和結果目錄
- ./logs:/app/logs
- ./results:/app/results
environment:
# Flask 配置
- FLASK_ENV=production
- PYTHONUNBUFFERED=1
- PYTHONPATH=/app
# 指定使用 testDB
- DB_ROOT_PATH=testDB
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5002/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- opensearch-test-network
labels:
- "com.opensearch-sql.description=OpenSearch-SQL Test Interface"
- "com.opensearch-sql.version=1.0"
- "com.opensearch-sql.database=testDB"
# testDB Few-shot 管理界面
fewshot-manager-test:
build:
context: .
dockerfile: Dockerfile
container_name: opensearch-sql-fewshot-test
ports:
- "5014:5003" # 使用不同的 port
volumes:
# 啟動腳本
- ./start_fewshot_testdb.py:/app/start_fewshot_testdb.py:ro
# testDB 的 Few-shot 配置
- ./testDB/fewshot:/app/testDB/fewshot
# testDB 的資料庫描述文件
- ./testDB/dev/dev_databases/testDB/database_description:/app/testDB/dev/dev_databases/testDB/database_description
# testDB 的資料集配置
- ./testDB/dev/dev.json:/app/testDB/dev/dev.json
- ./testDB/dev/tables.json:/app/testDB/dev/tables.json
# testDB 的資料庫文件
- ./testDB/dev/dev_databases/testDB/testDB.sqlite:/app/testDB/dev/dev_databases/testDB/testDB.sqlite
# testDB 的 Embedding 文件
- ./testDB/emb:/app/testDB/emb
environment:
- FLASK_ENV=production
- PYTHONUNBUFFERED=1
- PYTHONPATH=/app
- DB_ROOT_PATH=testDB
command: python start_fewshot_testdb.py
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5003/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- opensearch-test-network
labels:
- "com.opensearch-sql.description=OpenSearch-SQL Test Few-shot Manager"
- "com.opensearch-sql.version=1.0"
- "com.opensearch-sql.database=testDB"
networks:
opensearch-test-network:
driver: bridge