Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added docker compose #154

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3.13-slim

ENV PATH="${PATH}:/root/.local/bin"

WORKDIR /ai-hedge-fund

COPY . .

RUN apt update && apt install -y build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& pip install poetry \
&& poetry install

ENTRYPOINT ["poetry", "run", "python", "-u", "src/main.py"]

CMD ["--ticker", "AAPL"]
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,30 @@ ai-hedge-fund/
├── ...
```

## Docker & docker-compose

If you have docker installed on your system, you can easily run the project by running docker-compose.

First:

`cp .env.example .env`

Then:

`docker build -t ai-hedge-fund .`

To run it directly with docker run:

`docker run -it ai-hedge-fund`

Or if you prefer docker-compose & docker exec:

`docker-compose up -d`

Finally:

`docker exec -it ai-hedge-fund poetry run python src/main.py --ticker AAPL`

## Contributing

1. Fork the repository
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

services:
ai-hedge-fund:
container_name: ai-hedge-fund
restart: always
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/ai-hedge-fund
env_file:
- .env
stdin_open: true
tty: true