easybuild-framework
easybuild-framework copied to clipboard
XDG_CACHE_HOME should always be set to point into the tmpdir
We really need to start setting, if not HOME then at least, XDG_CACHE_HOME to point into the tmpdir. There are just too many things that either pollute $HOME with .cache stuff or causes problems when multiple builds are writing into $HOME/.cache For instance Go packages will unexpectedly fail if multiple builds of, for example ollama, are run as batch jobs at the same time, especially using different archs and/or OS releases. The crashes for ollama are also very difficult to understand since there is no relevance between the error it shows (missing symbols from various system libraries) and the actual reason for it (.cache file collision).
Or something under builddir of course, as long as it's a per-build directory
Makes sense to me, let's open a PR for it?
Yes, I just don't know where the best place to do this would be. options.py or somewhere else?
I'm not familiar with that part of the framework...
And it needs to be done late enough that it doesn't affect easybuild itself.
Yes, I just don't know where the best place to do this would be. options.py or somewhere else?
I'm not familiar with that part of the framework...
Maybe a new function like set_up_environment (probably needs a better name) that's called from main function in easybuild/main.py? Doesn't belong in options.py imho, since this is not about setting up the configuration for EasyBuild itself.
And it needs to be done late enough that it doesn't affect easybuild itself.
Why? EasyBuild itself doesn't use $XDG_CACHE_HOME at all?
So this can be done pretty early, even before call to set_up_configuration in prepare_main?