File tree Expand file tree Collapse file tree 2 files changed +40
-18
lines changed Expand file tree Collapse file tree 2 files changed +40
-18
lines changed Original file line number Diff line number Diff line change @@ -111,31 +111,23 @@ poetry run python src/backtester.py --ticker AAPL --start-date 2024-01-01 --end-
111
111
112
112
## Docker
113
113
114
- You can also build and run the project using Docker.
114
+ You can run the project easily using Docker Compose .
115
115
116
- 1 . Build the Docker image :
116
+ 1 . Run the agent with custom parameters :
117
117
``` bash
118
- docker build -t ai-hedge-fund .
118
+ docker compose run agent --ticker AAPL
119
119
```
120
120
121
- 2 . Run the Hedge Fund system :
121
+ 2 . Run the backtester with custom parameters :
122
122
``` bash
123
- docker run -it --env-file .env ai-hedge-fund python src/agents.py --ticker AAPL
123
+ docker compose run backtester --ticker AAPL
124
124
```
125
125
126
- 3 . Run the Backtester:
127
- ``` bash
128
- docker run -it --env-file .env ai-hedge-fund python src/backtester.py --ticker AAPL
129
- ```
130
-
131
- 4 . Run with additional options (e.g., reasoning and date range):
132
- ``` bash
133
- docker run -it --env-file .env ai-hedge-fund python src/agents.py \
134
- --ticker AAPL \
135
- --start-date 2024-01-01 \
136
- --end-date 2024-03-01 \
137
- --show-reasoning
138
- ```
126
+ Note:
127
+ - The ` .env ` file will be automatically loaded by Docker Compose
128
+ - Use ` docker-compose up ` to run with default parameters defined in docker-compose.yml
129
+ - Use ` docker-compose run ` to pass custom parameters - no need to specify the python command
130
+ - All arguments after the service name are passed directly to the script
139
131
140
132
## Project Structure
141
133
```
Original file line number Diff line number Diff line change
1
+ version : ' 3.8'
2
+
3
+ services :
4
+ agent :
5
+ build :
6
+ context : .
7
+ dockerfile : Dockerfile
8
+ env_file : .env
9
+ volumes :
10
+ - .:/app
11
+ entrypoint : python src/agents.py
12
+ command : --ticker AAPL
13
+ networks :
14
+ - ai-hedge-fund
15
+
16
+ backtester :
17
+ build :
18
+ context : .
19
+ dockerfile : Dockerfile
20
+ env_file : .env
21
+ volumes :
22
+ - .:/app
23
+ entrypoint : python src/backtester.py
24
+ command : --ticker AAPL
25
+ networks :
26
+ - ai-hedge-fund
27
+
28
+ networks :
29
+ ai-hedge-fund :
30
+ driver : bridge
You can’t perform that action at this time.
0 commit comments