From c08f9fd6fc9fda92e1b032f095f7699b64c585bf Mon Sep 17 00:00:00 2001 From: Pariksheet Nanda Date: Sun, 4 Jun 2023 19:28:41 -0400 Subject: py-jaxlib: patch bazel server cpu limit (#37548) (#38090) --- var/spack/repos/builtin/packages/py-jaxlib/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-jaxlib/package.py b/var/spack/repos/builtin/packages/py-jaxlib/package.py index 7d0c8b99da..d8def42008 100644 --- a/var/spack/repos/builtin/packages/py-jaxlib/package.py +++ b/var/spack/repos/builtin/packages/py-jaxlib/package.py @@ -50,6 +50,16 @@ class PyJaxlib(PythonPackage, CudaPackage): def patch(self): self.tmp_path = tempfile.mkdtemp(prefix="spack") self.buildtmp = tempfile.mkdtemp(prefix="spack") + filter_file( + "build --spawn_strategy=standalone", + f""" +# Limit CPU workers to spack jobs instead of using all HOST_CPUS. +build --spawn_strategy=standalone +build --local_cpu_resources={make_jobs} +""".strip(), + ".bazelrc", + string=True, + ) filter_file( 'f"--output_path={output_path}",', 'f"--output_path={output_path}",' -- cgit v1.2.3-70-g09d2