-
Notifications
You must be signed in to change notification settings - Fork 723
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (52 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
49
50
51
52
53
54
55
56
services:
# CLI(默认):docker compose run --rm tradingagents
tradingagents:
build: .
env_file:
- .env
volumes:
- tradingagents_data:/home/appuser/.tradingagents
tty: true
stdin_open: true
# Web UI:docker compose up web → http://localhost:8501
#
# 入口用 `tradingagents-web`(= web.launch:main),它按 __file__ 解析 app.py 的
# 绝对路径,与工作目录无关。不要写成 `streamlit run web/app.py`——那条依赖 CWD,
# 一旦工作目录不对就报 "File does not exist: web/app.py"(issue #82)。
web:
build: .
entrypoint: ["tradingagents-web"]
env_file:
- .env
environment:
# 容器内必须监听 0.0.0.0,否则端口映射进不来
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
- STREAMLIT_SERVER_PORT=8501
- STREAMLIT_SERVER_HEADLESS=true
ports:
- "8501:8501"
volumes:
- tradingagents_data:/home/appuser/.tradingagents
ollama:
image: ollama/ollama:latest
volumes:
- ollama_data:/root/.ollama
profiles:
- ollama
tradingagents-ollama:
build: .
env_file:
- .env
environment:
- LLM_PROVIDER=ollama
volumes:
- tradingagents_data:/home/appuser/.tradingagents
depends_on:
- ollama
tty: true
stdin_open: true
profiles:
- ollama
volumes:
tradingagents_data:
ollama_data: