Skip to content

Instantly share code, notes, and snippets.

@shawwn
Created November 2, 2021 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawwn/2c4ff5df07d6e90ac5c2a20c6e448d1a to your computer and use it in GitHub Desktop.
Save shawwn/2c4ff5df07d6e90ac5c2a20c6e448d1a to your computer and use it in GitHub Desktop.
A diff to enable bazel caching. I have no idea why it works, or what the implications are of the various commands. In fact, I have no idea where I even got these commands from. Buyer beware.
diff --git a/build/build.py b/build/build.py
index 2a812632..a78b1d03 100755
--- a/build/build.py
+++ b/build/build.py
@@ -507,6 +507,9 @@ def main():
config_args += ["--config=rocm"]
config_args += ["--config=nonccl"]
+ # don't rebuild everything every time.
+ config_args.extend("--action_env=PATH --remote_accept_cached=true --spawn_strategy=standalone --remote_local_fallback=false --remote_timeout=600".split())
+
command = ([bazel_path] + args.bazel_startup_options +
["run", "--verbose_failures=true"] + config_args +
[":build_wheel", "--",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment