Closed prioux closed 1 year ago
Hi @prioux ,
I guess I can duplicate all variable export with the prefixed names and add text warning to the tool config form. Which would result in more variables than needed yet less intrusive and problem ridden then renaming variable in the place
In the current version I tried to implement it with boutiques module because:
A boutiques module doesn't help in the case of tasks not implemented with Boutiques.
A boutiques module doesn't help in the case of tasks not implemented with Boutiques.
valid point, though majority of new tools are deployed with boutiques. Well, I can try without boutiques, ok
Our ToolConfig model allows the admin to configure environment variables settings for the tool, e.g.
ABC=xyz
. These setting are transformed into a set ofexport ABC=xyz
statements in the job script.When a tool is run within Singularity, these environment variables will be propagated by default into the container, except if the admin configures the
--cleanenv
(or-c
) option when singularity is invoked (in the ToolConfig attributecontainer_exec_args
which shows up as 'Misc Singularity options in the page). In that case the admin must either--env ABC=xyz
(or better--env ABC=$ABC
) in the Singularity optionsOption 1 means redundancy in defining the environment variables, and option 2 means that the tool config's environment table is now 'aware' of the containerized situation, which can lead to inconsistency when configuring the exact same tool without a container.
In order to make the life of the admin easier, I suggest that whenever a tool is launched through singularity, the set of export statements created by the ClusterTask object be replaced (or extended) with assignments of the form
export SINGULARITYENV_ABC=xyz
.