Skip to content

Conversation

@mrcghil
Copy link
Contributor

@mrcghil mrcghil commented Apr 22, 2025

No description provided.

run_options["name"] = extra_docker_config["name"]

if "environment" in extra_docker_config:
run_options["environment"] = [f"{item[0]}={item[1]}" for item in extra_docker_config["environment"]]
Copy link
Member

Choose a reason for hiding this comment

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

👍

@Martin-Molinero
Copy link
Member

Hey @mrcghil, thanks for the contribution!

Believe the extra environment values should merge with any existing in the run_options collection, you can follow the pattern of volumes a few lines below for example.

@mrcghil
Copy link
Contributor Author

mrcghil commented Apr 23, 2025

@Martin-Molinero Good point. I will append instead of overwriting. Are you okay with me ingesting a list of tuples - or iterables in general - of the kind ("env_var_name", "env_var_value") or would you rather pass a list of strings directly? The Tuple solution was working well enough for me, but I realise it might be less straightforward for others.

@Martin-Molinero
Copy link
Member

@Martin-Molinero Good point. I will append instead of overwriting. Are you okay with me ingesting a list of tuples - or iterables in general - of the kind ("env_var_name", "env_var_value") or would you rather pass a list of strings directly? The Tuple solution was working well enough for me, but I realise it might be less straightforward for others.

Hey! I would suggest accepting also a list/iterables of env_name=value strings, mimicking the docker run --env VAR1=value1 --env VAR2=value2. You could support ur current version too if u don't detect = was provided in the string 👍

@mrcghil
Copy link
Contributor Author

mrcghil commented May 4, 2025

Hello!
Apologies for the long pause. I have updated the file to support inputs as dict, and lists containing tuples or strings formatted as "key=value".

Copy link
Collaborator

@jhonabreul jhonabreul left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@jhonabreul jhonabreul merged commit 14072d6 into QuantConnect:master May 8, 2025
28 checks passed
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