You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM ubuntu:latest
ENV MY_VARIABLE="Hello, Docker!"
CMD ["bash", "-c", "echo $MY_VARIABLE"]
and I use a SlurmExecutor setting env_vars={"MY_VARIABLE": "Foo!"}, the variable MY_VARIABLE will not be overwritten and instead the result of executing the container would still be "Hello, Docker!".
In order to fix this, the SlurmExecutor needs to add a --container-env argument to the srun call that is a comma-separated list of variables to be exported from the environment, e.g.,
It's possible this override behavior is not always wanted, so it might also be reasonable to introduce a flag to indicate whether variables should be overwritten or not (possibly on a per-variable basis).
The text was updated successfully, but these errors were encountered:
gwarmstrong
changed the title
SlurmExecutor env_vars does not override ENV variables defined in the container
SlurmExecutor env_vars does not override ENV variables defined in the container image
Dec 19, 2024
If I have a docker file like:
and I use a
SlurmExecutor
settingenv_vars={"MY_VARIABLE": "Foo!"}
, the variableMY_VARIABLE
will not be overwritten and instead the result of executing the container would still be"Hello, Docker!"
.In order to fix this, the
SlurmExecutor
needs to add a--container-env
argument to the srun call that is a comma-separated list of variables to be exported from the environment, e.g.,It's possible this override behavior is not always wanted, so it might also be reasonable to introduce a flag to indicate whether variables should be overwritten or not (possibly on a per-variable basis).
The text was updated successfully, but these errors were encountered: