eth-cscs / sarus

OCI-compatible engine to deploy Linux containers on HPC environments.
https://sarus.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
130 stars 10 forks source link

Config Sarus runtime using environment variables #3

Open victorusu opened 4 years ago

victorusu commented 4 years ago

I would like to be able to have control as a user over Sarus by setting some environment variables. In principle, one could take control of the entire config options list (https://sarus.readthedocs.io/en/latest/config/configuration_reference.html) using environment variables.

For instance, siteMounts could be called mount or mounts (https://sarus.readthedocs.io/en/latest/config/configuration_reference.html#sitemounts-array-optional) could be defined as:

export SARUS_MOUNTS= "type:bind,source:/home,destination:/home;type:bind,source:/apps,destination:/apps"

Or one could define environment variables using something like

export SARUS_ENVS= "LD_PRELOAD=/my-path/bla.so;MYVAR=1"

The names and the syntax are not important, what is important is the control.