Correction.
Module show, just shows you what the module file will do (in module language).
Or, as already posted by someone else - you could just read the module file.
On 2022-07-14 01:45 PM, Paul Markfort wrote:
>
> make sure you are using the shell you will be creating the .env file for
> Then run:
> module show {modulename}
>
> The output is suitable to directly use in the .env file.
>
> On 2022-07-14 01:00 PM, Erik Parawell wrote:
>> Hi all,
>>
>> I have a use case where I need to figure out what changed in the environment from performing a `module load` and then export those changes to a shell loadable .env file. I have toyed with a couple ideas as listed below. But hopefully you guys might know of a easier path for me to take.
>>
>> 1) Creating a program to load the module and then extract the changes of the environment and save that to a file.
>> 2) Importing the module file into the container and letting it do the rest. The caveat is that the module still needs to be loaded beforehand to read the MODULE_BASE_DIR env var we have in each module to determine where the squashfs file needs to be created from and where the mount point would need to be.
>>
>> 3) Hopefully there is something easier or more maintainable than what I have been thinking of.
>>
>>
>>
>>
>> _______________________________________________
>> 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/
--------------------------------------------------------
|