Skip to content

Added Docker files #219

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

Closed
wants to merge 3 commits into from
Closed

Added Docker files #219

wants to merge 3 commits into from

Conversation

simonbinom
Copy link

I created the necessary files to run the application inside a Docker container. Additionally, I updated the README accordingly.

@apvar
Copy link

apvar commented Apr 14, 2025

Awesome! Thanks!

@@ -0,0 +1,25 @@
FROM python:3.10-slim
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use the latest python version 3.14

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.12-slim is the latest stable release, I have adjusted this accordingly.

&& apt-get clean

# Install poetry
ENV POETRY_VERSION=1.8.2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the latest peotry version 2.1.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version 1.8.5 ist the latest version working with the app, I adjusted it to 1.8.5

WORKDIR /app

# Copy project files
COPY pyproject.toml poetry.lock* ./
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line could be replaces by shifting line 22 to this position.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, makes sense

# Copy the rest of the application code
COPY . .

# Entry point
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not the entrypoint, it is the default command which will be executed when container starts. For Entrypoint use the ENTRYPOINT instruction. -> https://docs.docker.com/reference/dockerfile/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will adjust it

@@ -0,0 +1,10 @@
version: "3.9"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the version element isn't needed in the latest version of docker compose

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

## Running in Docker
```bash
docker build -t ai-hedge-fund .
docker-compose build --no-cache
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't necessary to use compose to build the image.

docker build -t ai-hedge-fund

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adjusted the part for building/running

```bash
docker build -t ai-hedge-fund .
docker-compose build --no-cache
docker-compose run --rm ai-hedge-fund
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker compose is a plugin of docker you have to use the command as followed.
and it possible to run it detached.

docker compose up -d

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adjusted the part for building/running

@r0b2g1t
Copy link

r0b2g1t commented Apr 15, 2025

is duplicate to #201 could be closed.

@simonbinom
Copy link
Author

Thanks for your inputs, I adjusted the code an will open a new PR.

@simonbinom simonbinom closed this Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants