I forgot to ask - what version of modules in installed with CentOS 8 (A search seems to suggest it is 4.5.2)?
Keep in mind that the current version is 5.0.1
The page you reference has a warning about potential incompatibilities with modules.
There is also an example on that page, on how to set an environment variable on the command line.
Additionally - you could create a script (start-singularity.sh) that presets some environment variables before running singularity (since scripts run in a sub-shell - it won't affect your main shell's environment).
I think a possible fix (for you) is to just remove (remark out) the 'export FPATH' line in the modules init/zsh script - it is worth a test (I note that FPATH is not exported by default in zsh - and that line is not in the init script for modules 4.1.4, but is there for 4.5.2 - I don't know which version made that change).
I personally remark out the export lines in the init/bash script myself - as I don't see a need to export the module functions - as they generally get loaded again when a new interactive shell is started, and I don't want to accidentally depend on them in scripts.
Maybe Xavier could add an install option - that remarks out (most) export lines in all the initialization scripts when modules are installed.
Of course, remarking out the 'export FPATH' line in the zsh init script might be something to consider for all installations.
On 10/19/2021 10:36 AM, Götz Waschk wrote:
> Am 19.10.21 um 17:21 schrieb Paul Markfort:
>> This actually sounds like a bug with singularity - as your singularity session should be isolated from your normal environment. This is like your shell variables affecting the environment in a virtual Linux machine.
>>
>> It seems to be a goal of singularity, that the process under it run under a completely isolated and consistent environment, see:
>> https://singularity.hpcng.org/
>
> Dear Paul,
>
> not really, the environment variables of the host are propagated to container environment unless you specify the option
> -e, --cleanenv clean environment before running container
>
> https://singularity.hpcng.org/user-docs/3.8/environment_and_metadata.html#
>
> It is just that $FPATH is a special variable for zsh. It would be nice if you could mask specific vars in singularity though.
>
> Regards,
> Götz
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
--
--------------------------------------------------------
The views and opinions expressed above are strictly
those of the author(s). The content of this message has
not been reviewed nor approved by any entity whatsoever.
--------------------------------------------------------
Paul FM Info: http://paulfm.com/~paulfm/
--------------------------------------------------------
|