From ea828bc2e8b7b447fa9e3fb8002da53927b65188 Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Fri, 28 Jun 2024 10:26:52 -0700 Subject: [PATCH] bazel: allow rules_python to run with root user This isn't ideal, but it sounds like it really only affects the ability to cache *.pyc files. In our case, we have about a grand total of 3 or 4 files we compile with Python so I'm not sure it's worth the headache right of figuring out a different way to deal with this. https://github.com/bazelbuild/rules_python/issues/1169 Useful for docker builds that require extra effort to use in a non-root context. Signed-off-by: Noah Watkins --- MODULE.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/MODULE.bazel b/MODULE.bazel index de0997b75392d..7dbc320fb1d97 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -48,6 +48,7 @@ python = use_extension("@rules_python//python/extensions:python.bzl", "python", python.toolchain( is_default = True, python_version = "3.12", + ignore_root_user_error = True, ) pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")