easybuilders / easybuild-easyconfigs

A collection of easyconfig files that describe which software to build using which build options with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
379 stars 701 forks source link

Bazel floods homedir with files when building Flax #21328

Open VRehnberg opened 1 month ago

VRehnberg commented 1 month ago

When building Flax from https://github.com/easybuilders/easybuild-easyconfigs/pull/21039/files build errors out with error message:

/cephyr/users/c3-builder/Alvis/.cache/bazel/_bazel_c3-builder/8408e517ae040ba22f0bf974451c879f/sandbox/linux-sandbox/38 (Disk quota exceeded)

Probably should use same solution of giving --install_base and --output_user_root as done in https://github.com/easybuilders/easybuild-easyblocks/pull/1519/files

lexming commented 1 month ago

There is also --output-base which puts all scratch and build output below this directory. This is one level below output_user_root and does not affect install files. See https://bazel.build/remote/output-directories

Example to use in a similar way to what we do with CMake:

bazel --output_base=%(builddir)s/easybuild_obj build
boegel commented 1 month ago

Can this be done via environment variables?

Since in the case of Flax, we're not running bazel ourselves (it's not even provided as a build dependency...)

branfosj commented 1 month ago

The outputRoot directory defaults to ${XDG_CACHE_HOME}/bazel (or ~/.cache/bazel, if the XDG_CACHE_HOME environment variable is not set) on Linux

So we'd need to set XDG_CACHE_HOME for this build and, maybe, anything using Bazel to buiod.