easybuild-framework icon indicating copy to clipboard operation
easybuild-framework copied to clipboard

XDG_CACHE_HOME should always be set to point into the tmpdir

Open akesandgren opened this issue 4 months ago • 4 comments
trafficstars

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).

akesandgren avatar Jun 18 '25 16:06 akesandgren

Or something under builddir of course, as long as it's a per-build directory

akesandgren avatar Jun 18 '25 17:06 akesandgren

Makes sense to me, let's open a PR for it?

boegel avatar Jun 18 '25 17:06 boegel

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...

akesandgren avatar Jun 18 '25 17:06 akesandgren

And it needs to be done late enough that it doesn't affect easybuild itself.

akesandgren avatar Jun 18 '25 18:06 akesandgren

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?

boegel avatar Sep 02 '25 07:09 boegel