-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Added Docker files #219
Conversation
Awesome! Thanks! |
@@ -0,0 +1,25 @@ | |||
FROM python:3.10-slim |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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* ./ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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/
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
is duplicate to #201 could be closed. |
Thanks for your inputs, I adjusted the code an will open a new PR. |
I created the necessary files to run the application inside a Docker container. Additionally, I updated the README accordingly.