Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use EPEL Lmod #53

Open
wpoely86 opened this issue Feb 5, 2025 · 2 comments
Open

Use EPEL Lmod #53

wpoely86 opened this issue Feb 5, 2025 · 2 comments

Comments

@wpoely86
Copy link
Contributor

wpoely86 commented Feb 5, 2025

FYI: you can use the Lmod from EPEL and only put the config stuff in a repo. Example on https://github.com/vub-hpc/Lmod-config

And some quattor:

unique template common/lmodvub/config;

include 'metaconfig/lmod/config';

prefix "/software/components/metaconfig/services/{/etc/lmodrc.lua}/contents";

"prop" = dict();

"scDescript/0" = dict(
    "timestamp", '/apps/brussel/" .. (os.getenv("VSC_OS_LOCAL") or "") .. "/" .. os.getenv("VSC_ARCH_LOCAL") .. ' +
                '(os.getenv("VSC_ARCH_SUFFIX") or "") .. "/cacheDir/system.txt',
    "dir", '/apps/brussel/" .. (os.getenv("VSC_OS_LOCAL") or "").. "/" .. os.getenv("VSC_ARCH_LOCAL") .. ' +
            ' (os.getenv("VSC_ARCH_SUFFIX") or "") .. "/cacheDir',
);

# cache for CentOS-7 legacy-software
"scDescript/1" = dict(
    "timestamp", '/apps/brussel/CO7/" .. os.getenv("VSC_ARCH_LOCAL") .. ' +
                '(os.getenv("VSC_ARCH_SUFFIX") or "") .. "/cacheDir/system.txt',
    "dir", '/apps/brussel/CO7/" .. os.getenv("VSC_ARCH_LOCAL") .. ' +
            ' (os.getenv("VSC_ARCH_SUFFIX") or "") .. "/cacheDir',
);

prefix "/software/components/metaconfig/services";

# TODO: add proper schema support

'{/etc/lmod/lmod_config.lua}' = create('metaconfig/generic/multiline');
'{/etc/lmod/lmod_config.lua}/mode' = 0644;
'{/etc/lmod/lmod_config.lua}/contents' = list(
    'require("strict")',
    'local cosmic = require("Cosmic"):singleton()',
    'cosmic:assign("LMOD_ADMIN_FILE", "/etc/lmod/admin.list")',
    'cosmic:assign("LMOD_AUTO_SWAP", "no")',
    'cosmic:assign("LMOD_CACHED_LOADS", "yes")',
    'cosmic:assign("LMOD_CASE_INDEPENDENT_SORTING", "yes")',
    'cosmic:assign("LMOD_DISABLE_SAME_NAME_AUTOSWAP", "yes")',
    'cosmic:assign("LMOD_EXTENDED_DEFAULT", "no")',
    'cosmic:assign("LMOD_PACKAGE_PATH", "/etc/lmod")',
    'cosmic:assign("LMOD_PIN_VERSIONS", "yes")',
    'cosmic:assign("LMOD_REDIRECT", "yes")',
    'cosmic:assign("LMOD_SHORT_TIME", 86400)',
    'cosmic:assign("LMOD_SITE_MSG_FILE", "/etc/lmod/lang.lua")',
    'cosmic:assign("LMOD_SITE_NAME", "VUB_HPC")',
);
@boegel
Copy link
Member

boegel commented Feb 9, 2025

That makes sense in general, unless when a breaking change slips in a bug fix release that introduces an incompatibility with EasyBuild:

@wpoely86
Copy link
Contributor Author

We only had on issue once with this. And if you really worry, version lock it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants