Bazel Remote Execution - Namespace Documentation
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Assistant
Responses are generated using AI and may contain mistakes.
Run Bazel actions on Namespace compute instead of on the machine driving the build.
Remote Execution is now generally available.
Namespace runs your Bazel actions on workers it keeps running for your
workspace, so a build can spread across many workers without waiting for them to
start. Actions can also run on a platform other than the one driving Bazel,
which is how a Linux host can build and test macOS artifacts.Remote Execution builds on the Namespace Bazel cache. The
configuration written by nsc bazel setup includes both the remote executor and
the remote cache, so remotely executed actions share artifacts with your CI and
local builds.
Getting started
Remote Execution is enabled for every workspace. Use
nsc bazel setup to create a Bazel
configuration file for the execution cluster:
1
Configure execution access
nsc bazel setup --bazelrc=~/.namespace.bazelrc
This command provisions the scheduler and storage components if needed and writes a Bazel configuration file with the remote executor, remote cache, credentials, and recommended execution defaults.
2
Run Bazel with remote execution
bazel --bazelrc=~/.namespace.bazelrc build //...
You can pass multiple --bazelrc flags if you need to combine Namespace’s
generated configuration with your existing project configuration.
How it works
A Bazel Remote Execution cluster has three components:
- Scheduler: accepts Bazel Remote Execution API requests and assigns actions to workers.
- Storage: stores content-addressable storage (CAS) entries durably across the cluster.
- Workers: execute Bazel actions.
Your build
BazelRunning on your machine, in CI, or in a Devbox
Remote Execution API
Namespace
SchedulerAccepts requests and assigns actions to workers
assigns actions
Worker4 execution slots
Worker4 execution slots
Worker4 execution slots
action inputs & outputs
StorageContent-addressable storage, shared with the Bazel cache
A Bazel client submits actions through the Remote Execution API to Namespace, where the scheduler assigns work to workers that exchange inputs and outputs with shared storage.Each worker advertises a fixed number of execution slots. A slot represents one unit of concurrent work, so a worker with four slots can run up to four actions at the same time. Namespace adds workers as a build requires more capacity.
Example: Linux host to Linux workers
This example runs Bazel from a Linux host and executes actions on Linux workers. It uses a public Bazel repository so you can try the flow without changing your own project first.
git clone https://github.com/bazelbuild/examples.git
cd examples/cpp-tutorial/stage3
nsc bazel setup --bazelrc=~/.namespace.bazelrc --key=examples-linux
bazel --bazelrc=~/.namespace.bazelrc build //...
Actions without explicit platform properties are routed to Linux workers.
Example: Linux host to macOS workers
Bazel can also route selected actions to macOS workers from a Linux client. The
linux-to-mac-rbe-demo
repository demonstrates that setup.This example requires macos/arm64 workers to be enabled for your workspace. If
you see an error such as no on-demand worker capacity configured for platform "macos/arm64", reach out to the Namespace team to enable macOS worker capacity.
git clone https://github.com/namespacelabs/linux-to-mac-rbe-demo.git
cd linux-to-mac-rbe-demo
nsc bazel setup --bazelrc=~/.namespace.bazelrc --key=linux-to-mac-demo
bazelisk --bazelrc=~/.namespace.bazelrc build //DemoApp:DemoApp
For your own targets, route an action to macOS by setting Bazel execution properties on that target or platform, for example:
exec_properties = {
"OSFamily": "macos",
"Arch": "arm64",
}
Actions without macOS execution properties continue to run on the default Linux workers, allowing one Bazel invocation to use both platforms.
Remote Execution from a Devbox
You can enable Bazel Remote Execution on any Devbox, including one that already exists. Run setup from inside the Devbox, whether or not it was created with Bazel caching enabled.
1
Create a Devbox
Point --checkout at the repository that holds your Bazel workspace, so the
Devbox starts with the project already cloned:
devbox create --checkout=github.com/your-org/your-repo
Skip this step if you already have a Devbox with your Bazel project checked out.
2
Open a shell in the Devbox
devbox ssh my-devbox
Run the remaining steps inside the Devbox, not on your own machine.
3
Enable remote execution
nsc bazel setup --bazelrc=/home/devbox/.bazelrc
Remote execution --remote=true is on by default, so this writes both
the remote executor and the remote cache into the configuration. Pass
--remote=false for a cache-only setup.
Devboxes store the path to the bazelrc in the BAZELRC environment variable, which lets scripts and later examples name the configuration without hardcoding the path. Check that it is set:
echo $BAZELRC
If that comes back empty, set it yourself with:
echo 'export BAZELRC="/home/devbox/.bazelrc"' >> ~/.bashrc
4
Run Bazel
bazel build //...
/home/devbox/.bazelrc is the devbox user’s home bazelrc, so Bazel picks it
up with no flags.
Keep repository-specific execution settings in a bazelrc checked into your
repository rather than editing the generated one, since setup overwrites it each
time it runs. Combine the two with repeated --bazelrc flags, using the
BAZELRC environment variable that the Devbox sets to the generated file:
bazel --bazelrc=$BAZELRC --bazelrc=tools/bazelrc/rbe.bazelrc build //...
Remote Execution from CI
Authenticating Remote Execution with a revocable token requires nsc v0.0.544 or later. Run nsc version ensure --at_least 0.0.544 to check and update the CLI if needed.
By default, nsc bazel setup uses your interactive login and writes a
bazelrc that authenticates to the cluster with a short-lived mTLS client
certificate. For CI/CD pipelines, automation, or any environment without an
interactive login, you can instead authenticate with a
revocable token.Revocable tokens are long-lived but can be revoked at any time from
cloud.namespace.so/user/sessions or
with nsc token revoke.
1
Create a revocable token
Use nsc bazel create-token to create
a token with the permissions required for Remote Execution and write it to a
file:
nsc bazel create-token \
--token rbe-token.json \
--expires_in 10d
Set --expires_in to a duration of up to 365 days.
2
Generate a bazelrc with the token
Pass the token file to the setup command. This provisions a cluster that uses the revocable token to obtain short-lived credentials:
nsc bazel setup --token rbe-token.json --bazelrc=namespace.bazelrc
3
Run Bazel with remote execution
bazel --bazelrc=namespace.bazelrc build //...
Additional configuration options
Bazel execution properties can reserve worker CPU capacity and select the isolation mode on Linux workers:
exec_properties = {
"cpu": "2",
"namespace_action_isolation": "sandboxed",
"namespace_requires_network": "true",
}
Use --remote_default_exec_properties to apply a property to actions that do
not override it:
bazel --bazelrc=~/.namespace.bazelrc build //... \
--remote_default_exec_properties=cpu=2 \
--remote_default_exec_properties=namespace_action_isolation=sandboxed \
Reserve CPU capacity
The cpu property tells the scheduler how much CPU capacity to
reserve while an action runs. Values can be whole or fractional numbers, such
as "2" or "0.5". The scheduler considers both execution slots and CPU
reservations when assigning concurrent actions to a worker.The reservation is a scheduling input, not a CPU limit applied to the action.
An omitted or zero value does not reserve CPU capacity beyond the action’s
execution slot.resources:cpu is accepted as an alternative property name.
Select action isolation
The namespace_action_isolation property controls how a Linux worker runs an
action:
| Value | Behavior |
|---|---|
sandboxed |
Runs the action in an isolated filesystem, process, network, mount, UTS, and IPC environment. |
none |
Runs the action directly in the worker environment without additional per-action sandboxing. |
| Omitted | Uses the workspace default setting. |
The workspace default is none unless configured otherwise.
Sandboxed isolation is supported only on Linux workers at the moment.
Contact support@namespace.so to change the setting.Sandboxed actions receive an isolated, loopback-only network namespace by
default. Set namespace_requires_network to true on an action that needs
network access. The action keeps its filesystem, process, mount, UTS, and IPC
isolation, but shares the worker’s network namespace. Omit the property for
actions that do not need network access.
Custom worker pools
Named worker pools let actions select a worker machine type, custom base image,
and startup configuration.
Namespace creates a pool when its first action is queued, starts workers for it
on demand, and routes only actions that name that pool to those workers. Actions
without a pool use the workspace’s default workers.To use custom worker pools, define each pool as a Bazel execution platform. The
platform’s exec_properties describe the properties of the pool. A constraint
value then lets targets select that execution platform with
exec_compatible_with:
constraint_setting(name = "worker_pool")
constraint_value(
name = "compile_pool_constraint",
constraint_setting = ":worker_pool",
)
constraint_value(
name = "high_memory_pool_constraint",
constraint_setting = ":worker_pool",
)
platform(
name = "compile_pool",
constraint_values = [":compile_pool_constraint"],
exec_properties = {
"namespace_pool": "compile",
"namespace_pool_machine_type": "linux/amd64:16x32",
},
)
platform(
name = "high_memory_pool",
constraint_values = [":high_memory_pool_constraint"],
exec_properties = {
"namespace_pool": "high-memory",
"namespace_pool_machine_type": "linux/amd64:16x64",
},
)
genrule(
name = "compile_probe",
outs = ["compile_probe.txt"],
cmd = "printf compile > $@",
exec_compatible_with = [":compile_pool_constraint"],
)
genrule(
name = "high_memory_probe",
outs = ["high_memory_probe.txt"],
cmd = "printf high-memory > $@",
exec_compatible_with = [":high_memory_pool_constraint"],
)
Register the pool platforms when invoking Bazel:
bazel --bazelrc=~/.namespace.bazelrc build //... \
--extra_execution_platforms=//:compile_pool,//:high_memory_pool
You can add --extra_execution_platforms to your project bazelrc instead of
passing it on every invocation.The machine type uses the format <os>/<arch>:<cpu>x<memory>. For example,
linux/amd64:16x64 selects a Linux AMD64 worker with 16 vCPUs and 64 GB of
memory. See Machine Shapes for
supported CPU and memory configurations.The following execution properties define a pool:
| Property | Description |
|---|---|
namespace_pool |
Required property that names the pool. Use different names for different configurations. |
namespace_pool_machine_type |
Required property of the format <os>/<arch>:<cpu>x<memory>. Examples include linux/arm64:8x16 and macos/arm64:6x14. |
namespace_pool_worker_image |
Overrides the worker base image. When omitted, the pool will use the default worker image. |
namespace_pool_startup_script |
Script that runs once on every worker before it registers. Requires direct execution. |
Every execution platform that uses the same pool name must provide the same pool definition. The scheduler rejects an action if any property conflicts with the pool’s existing definition.
Configure workers at startup
Set namespace_pool_startup_script to an arbitrary shell script that Namespace should
run once on every worker in the pool. The script runs after image preparation
and before the worker registers with the scheduler, so no actions are assigned
until it completes successfully.This example prepares a cache directory on every macOS worker in the pool:
platform(
name = "configured_macos_pool",
exec_properties = {
"namespace_pool": "configured-macos",
"namespace_pool_machine_type": "macos/arm64:6x14",
"namespace_pool_startup_script": """
set -eu
mkdir -p "$HOME/.cache/my-build"
""",
"namespace_action_isolation": "none",
},
)
Startup scripts are supported on Linux and macOS workers with direct execution.
They are not supported with sandboxed execution because each action uses a
separate, disposable filesystem. If the workspace default is sandboxed, set
namespace_action_isolation to none on the execution platform as shown above.If the script exits with a non-zero status, the worker does not register or
handle actions. Environment variables exported by the script do not persist
after it exits, so write configuration to disk when actions need to consume it.
Custom worker base images
By default, actions run using one of Namespace’s managed worker images. If your
actions need extra tools, libraries, or a specific base environment, you can run
them inside your own container image instead.Custom images are selected per action through the standard Bazel
container-image execution property.A few requirements apply:
- The image reference must be pinned to an immutable digest
(
repo@sha256:...). Tags are rejected. - The image must be optimized before it can be used. Namespace converts the image into a fast-booting disk variant.
- The worker image must be hosted in the Namespace container registry
nscr.io. - Custom images are supported on Linux workers only.
Build, push, and optimize a custom image
1
Build and push your image
Write a Dockerfile that starts from any Linux base and adds the tools your
actions need. Authenticate against nscr.io with
nsc docker login, then build and push it
with nsc build for the worker architecture
(linux/amd64 or linux/arm64):
nsc docker login
nsc build . -t nscr.io/<tenant>/my-worker:latest --platform linux/amd64 --push
Already have an image elsewhere? Use
nsc base-image upload to pull it and
push it into your nscr.io registry instead:
nsc base-image upload <source-image> my-worker:latest
2
Pin it to an immutable digest
The scheduler requires a digest, not a tag. Resolve the digest your push produced:
docker inspect --format '{{index .RepoDigests 0}}' nscr.io/<tenant>/my-worker:latest
nscr.io/<tenant>/my-worker@sha256:<digest>
Use that repo@sha256:<digest> reference everywhere below.
3
Optimize the image
Optimize the pinned image with
nsc base-image optimize. This step blocks until the optimized variant is ready:
nsc base-image optimize --image_ref nscr.io/<tenant>/my-worker@sha256:<digest>
You only need to optimize a given digest once. Pushing a new image with a new digest requires optimizing that new digest.
Optimizing a base image from a GitHub Actions job requires the job to run with additional permission grants. Pass the baseimage:*:* grant as a permissions.additional_grant feature setting on the runner.
With a runner profile, append it to the profile name:
jobs:
rbe:
runs-on:
- namespace-profile-foobar;permissions.additional_grant=baseimage:*:*
With a machine label, pass it through the namespace-features: label instead:
jobs:
rbe:
runs-on:
- nscloud-ubuntu-22.04-amd64-4x8-with-features
- namespace-features:permissions.additional_grant=baseimage:*:*
See
Configuring Features and Overrides
for the full syntax of feature settings, and
Access Level
for restricting what a runner can do.This grant is only needed when optimizing from a GitHub Actions job. Running
nsc base-image optimize from a local machine outside of Namespace does not
require it.
4
Use it in your build
Point your actions at the custom worker image with the
container-image execution property (see the next sections).
If you run a build against an image that has not been optimized yet, the scheduler rejects the affected actions with an error telling you the image is not optimized. Run nsc base-image optimize for that digest.
Use the custom image
Set the container-image execution property on a specific target or platform so
only those actions run with the custom worker image:
exec_properties = {
"container-image": "docker://<repo>@sha256:<digest>",
}
The docker:// scheme prefix is optional. To apply an image through a custom
worker pool instead, set namespace_pool_worker_image as described in
Custom worker pools.
Run preparation scripts at worker startup
A custom worker image can ship preparation scripts that run once before the
worker starts handling any actions. These hooks handle setup that must run on
every worker boot, such as mounting an external /nix store or seeding caches.Place executable files in /etc/namespace/prepare.d inside your image. On
startup, the worker runs every executable file in that directory in lexical
order (e.g. 10-mount.sh before 20-warmup.sh). Non-executable files and
subdirectories are skipped.
Preparation scripts are critical: they run at the very start, and if any script exits non-zero the worker fails to start and handles no work.
Observability
Namespace records every invocation that runs through remote execution. Inspect
them from the Bazel invocations
page, or from the CLI with
nsc bazel invocation list and
nsc bazel invocation report.Reports carry worker assignment and timing, queue times, and hydration times
alongside the usual action and target data, which makes them the place to look
when a build fails for a reason Bazel cannot see.See Bazel observability for the full workflow,
including how to analyze a report with an agent.Future reports will also include operation joins, which indicate whether an
invocation joins action invocations from other invocations, and hot or warm
cache information.
Current caveats
Remote Execution has the following current limitations:
- Action isolation within macOS workers is not available yet.
If any of these caveats block your use case, contact support@namespace.so so we can help find an appropriate solution.
Last modified onSeptember 15, 2026
Ctrl+I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Namespace Documentation","colors":{"primary":"#1C32FF","light":"#6B78FF","dark":"#1C32FF"},"logo":{"light":"https://mintcdn.com/namespace-labs/qOJQ7kaWRgoS8lyv/logo-light.svg?fit=max\\u0026auto=format\\u0026n=qOJQ7kaWRgoS8lyv\\u0026q=85\\u0026s=6827b0c81c335badc1cef13b83383e1d","dark":"https://mintcdn.com/namespace-labs/qOJQ7kaWRgoS8lyv/logo-dark.svg?fit=max\\u0026auto=format\\u0026n=qOJQ7kaWRgoS8lyv\\u0026q=85\\u0026s=63702d83d8fb259023deb79db06aabbb","href":"https://namespace.so"},"favicon":"https://mintcdn.com/namespace-labs/MoefQ379UcpNU680/favicon.svg?fit=max\\u0026auto=format\\u0026n=MoefQ379UcpNU680\\u0026q=85\\u0026s=6f14a088da55e5f41847845796737353","navbar":{"links":\[{"href":"https://namespace.so/changelog","label":"Changelog"},{"href":"https://namespace.so/support","label":"Support"}\],"primary":{"type":"button","label":"Log in","href":"https://cloud.namespace.so"}},"footer":{"socials":{"github":"https://github.com/namespacelabs","linkedin":"https://www.linkedin.com/company/namespacelabs","x":"https://x.com/namespacelabs"}},"icons":{"library":"lucide"},"contextual":{"options":\["copy","view","chatgpt","claude"\],"display":"header"},"interaction":{"drilldown":false},"metadata":{"timestamp":true},"styling":{"latex":true},"navigation":{"global":{"anchors":\[{"anchor":"Changelog","icon":"history","href":"https://namespace.so/changelog"},{"anchor":"Trust Center (SOC2)","icon":"shield-check","href":"https://trust.namespace.so/"},{"anchor":"Status","icon":"activity","href":"https://namespace-status.com/"},{"anchor":"Support","icon":"message-circle","href":"https://namespace.so/support"}\]},"pages":\[\]}},"deployment":{"deploymentMetadataValue":{"subdomain":"namespace-labs","hasAudioNarration":false,"actualSubdomain":"namespace-labs","customDomains":\["namespace.so"\],"gitSource":{"type":"github","owner":"namespacelabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ae0862207896b4595e1934b","collectionId":"847aecca-4a0b-40b4-a393-e976cc214b43","liveDeploymentHistoryId":"6ae0862207896b4595e1934b","schemaVersion":"v3"},"entitlements":{"AI\_CHAT":{"status":"ENABLED"},"WEB\_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae0a8f6edbd4c098a94623c","clientVersion":"0.0.3971","searchFilterCounts":\[{"language":"default","tag":"Products","count":377},{"language":"default","tag":"CLI","count":166},{"language":"default","tag":"Command line","count":165},{"language":"default","tag":"Namespace CLI","count":131},{"language":"default","tag":"Documentation","count":104},{"language":"default","tag":"GitHub Actions","count":40},{"language":"default","tag":"Devbox CLI","count":34},{"language":"default","tag":"Integrations","count":33},{"language":"default","tag":"SDK","count":25},{"language":"default","tag":"Namespace SDK","count":23}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"snippets/diagrams/styles.css","content":".ns-diagram{--ns-diagram-background:#ffffff;--ns-diagram-grid:#e5e7ee;--ns-diagram-border:#e5e7ee;--ns-diagram-card:#ffffff;--ns-diagram-neutral-zone:#fafbfc;--ns-diagram-brand-zone-start:rgba(28, 50, 255, 0.04);--ns-diagram-brand-zone-end:rgba(28, 50, 255, 0.07);--ns-diagram-brand-border:#c8ceff;--ns-diagram-heading:#202938;--ns-diagram-muted:#8892a6;--ns-diagram-copy:#4a5468;position:relative;width:100%;margin:2rem 0;padding:clamp(20px,3.5vw,32px);overflow:hidden;color:var(--ns-diagram-heading);background:var(--ns-diagram-background);border:1px solid var(--ns-diagram-border);border-radius:20px;box-shadow:0 1px 0 rgba(32,41,56,.04),0 1px 2px rgba(32,41,56,.06)}.dark .ns-diagram{--ns-diagram-background:#111827;--ns-diagram-grid:#374151;--ns-diagram-border:#374151;--ns-diagram-card:#1f2937;--ns-diagram-neutral-zone:#171f2d;--ns-diagram-brand-zone-start:rgba(107, 120, 255, 0.1);--ns-diagram-brand-zone-end:rgba(107, 120, 255, 0.16);--ns-diagram-brand-border:#4f5fc7;--ns-diagram-heading:#f3f4f6;--ns-diagram-muted:#aeb6c5;--ns-diagram-copy:#cbd5e1}.ns-diagram-grid-background{position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle,var(--ns-diagram-grid) 1px,transparent 1px);background-size:16px 16px;opacity:.5;mask-image:linear-gradient(180deg,transparent 0,#000 10%,#000 90%,transparent 100%)}.ns-diagram-content{position:relative}.ns-diagram-caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ns-diagram-mark{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;margin:0;border-radius:8px}.ns-diagram-mark-anthropic{color:#d97757;background:#fcefe8}.ns-diagram-mark-devin{color:#4338ca;background:#eef0ff}.ns-diagram-mark-cursor{color:#111827;background:#eef0f3}.ns-diagram-mark-control{color:#1c32ff;background:#e0e7ff}.ns-diagram-mark-terminal{color:#fff;background:#202938}.ns-diagram-mark-worker{color:#4338ca;background:#eef1ff}.ns-diagram-zone{position:relative;display:flex;flex-direction:column;padding:1.25rem;background:var(--ns-diagram-neutral-zone);border:1px dashed #d2d6e0;border-radius:14px}.dark .ns-diagram-zone{border-color:#4b5563}.ns-diagram-zone-brand{background:linear-gradient(180deg,var(--ns-diagram-brand-zone-start),var(--ns-diagram-brand-zone-end));border:1px solid var(--ns-diagram-brand-border)}.ns-diagram-zone-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;color:var(--ns-diagram-copy);font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase}.ns-diagram-zone-center{display:flex;flex:1;align-items:center}.ns-diagram-zone-center>*{width:100%}.ns-diagram-card{position:relative;display:flex;align-items:center;gap:1rem;min-width:0;padding:1rem 1.25rem;background:var(--ns-diagram-card);border:1px solid var(--ns-diagram-border);border-radius:12px;box-shadow:0 1px 0 rgba(32,41,56,.04),0 1px 2px rgba(32,41,56,.06)}.ns-diagram-card-brand{border-color:var(--ns-diagram-brand-border)}.ns-diagram-card-copy{display:flex;min-width:0;flex-direction:column}.ns-diagram-card-label{color:var(--ns-diagram-heading);font-size:16px;font-weight:600;line-height:1.25;letter-spacing:-.01em}.ns-diagram-card-sublabel{margin-top:.125rem;color:var(--ns-diagram-muted);font-size:12px;line-height:1.35}.ns-managed-layout{display:grid;grid-template-columns:1fr auto 1.05fr;align-items:stretch}.ns-managed-connector{display:flex;width:64px;flex-direction:column;align-items:center;justify-content:center;padding:0 .25rem;color:var(--ns-diagram-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:10.5px}.ns-managed-connector>span{margin-bottom:.375rem}.ns-managed-connector-path{display:flex;width:56px;align-items:center}.ns-managed-connector-line{flex:1;height:1.5px;background:#d2d6e0}.ns-managed-connector-arrow{border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:9px solid #d2d6e0}.ns-mini-connector{display:flex;flex-direction:column;align-items:center;padding:.375rem 0}.ns-mini-connector>div{width:1.5px;height:12px;background:var(--ns-diagram-brand-border)}.ns-mini-connector>span{border-top:7px solid var(--ns-diagram-brand-border);border-right:5px solid transparent;border-left:5px solid transparent}.ns-devin-devboxes,.ns-devin-sessions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}.ns-devin-mobile-layout{display:none}.ns-devin-connectors,.ns-devin-connectors>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.ns-devin-connectors{gap:1.5rem}.ns-devin-connectors>div{padding:0 1rem}.ns-devin-connector{position:relative;display:flex;min-height:110px;align-items:center;justify-content:center;color:var(--ns-diagram-copy);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:10px;line-height:1.25;text-align:center}.ns-devin-management-connector{min-height:70px;color:#6366f1}.ns-devin-connector-line{position:absolute;top:0;bottom:0;left:50%;width:1.5px;background:#d2d6e0;transform:translateX(-50%)}.ns-devin-management-connector .ns-devin-connector-line,.ns-diagram-connector-dashed .ns-diagram-vertical-line{width:0;background:0 0;border-left:1.5px dashed var(--ns-diagram-brand-border)}.ns-devin-connector>span,.ns-diagram-vertical-connector>span{position:relative;z-index:1;padding:0 .375rem;background:var(--ns-diagram-background)}.ns-control-plane-pill{display:flex;align-items:center;align-self:center;gap:.375rem;margin-bottom:1rem;padding:.375rem .75rem;color:#4338ca;background:#eef1ff;border:1px solid var(--ns-diagram-brand-border);border-radius:999px;font-size:12px;font-weight:500}.ns-diagram-vertical-connector{position:relative;display:flex;align-items:center;justify-content:center;color:var(--ns-diagram-copy);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:10px;line-height:1.25;text-align:center}.ns-diagram-vertical-line{position:absolute;top:0;bottom:0;left:50%;width:1.5px;background:#d2d6e0;transform:translateX(-50%)}.ns-diagram-connector-dashed{color:#6366f1}.ns-diagram-arrow-down{position:absolute;bottom:0;left:50%;border-top:8px solid #d2d6e0;border-right:5px solid transparent;border-left:5px solid transparent;transform:translateX(-50%)}.ns-devin-management-connector .ns-diagram-arrow-down,.ns-diagram-connector-dashed .ns-diagram-arrow-down{border-top-color:var(--ns-diagram-brand-border)}.ns-bazel-connector-inset{padding:0 1rem}.ns-bazel-workers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}@media (max-width:767px){.ns-managed-layout{grid-template-columns:1fr}.ns-managed-connector{position:relative;width:auto;min-height:64px;padding:.5rem 0}.ns-managed-connector-path{width:auto;flex-direction:column}.ns-managed-connector-line{width:1.5px;height:24px;flex:none}.ns-managed-connector-arrow{border-top:9px solid #d2d6e0;border-right:6px solid transparent;border-bottom:0;border-left:6px solid transparent}.ns-devin-connectors,.ns-devin-devboxes,.ns-devin-sessions{grid-template-columns:1fr}.ns-devin-desktop-layout{display:none}.ns-devin-mobile-layout{display:block}.ns-devin-mobile-lane+.ns-devin-mobile-lane{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid var(--ns-diagram-border)}.ns-devin-mobile-connectors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0 .5rem}.ns-devin-connector{min-height:80px}.ns-bazel-workers{grid-template-columns:1fr}}"},{"filePath":"style.css","content":":root{--namespace-radius-inline:0.25rem;--namespace-radius-control:0.375rem;--namespace-radius-container:0.5rem}#content-container,.almond-layout>div,.card,.chat-assistant-floating-input>div,.code-block,.frame,.pagination-next,.pagination-prev{border-radius:var(--namespace-radius-container)}.code-block [data-component-part=code-block-root],.frame>div{border-radius:inherit}#assistant-entry,#chat-assistant-textarea,#search-bar-entry,#search-input,.callout,.frame>.relative{border-radius:var(--namespace-radius-control)}.code-block-fade-overlay{border-radius:0 var(--namespace-radius-container) var(--namespace-radius-container) 0}#page-context-menu>button:first-child{border-radius:var(--namespace-radius-control) 0 0 var(--namespace-radius-control)}#page-context-menu>button:last-child{border-radius:0 var(--namespace-radius-control) var(--namespace-radius-control) 0}#content :not(pre)>code,#navigation-items li>a,#navigation-items li>button{border-radius:var(--namespace-radius-inline)}#navigation-items .nav-anchor>:is(svg, img),#navigation-items .sidebar-group-icon,#navigation-items [data-component-part=scroll-area-content]:has(>ul.nav-anchors),#navigation-items li>:is(a, button)>div[class=\"h-[1lh]\"]:first-child{display:flex;flex-direction:column}#navigation-items [data-component-part=scroll-area-content]>ul.nav-anchors{order:1;margin-top:1rem;padding-top:1rem;border-top:1px solid color-mix(in srgb,currentColor 10%,transparent)}#navigation-items [data-component-part=scroll-area-content]>ul.sidebar-group{margin-top:.5rem}#navigation-items [data-component-part=scroll-area-content]>ul.sidebar-group+div{margin-top:1rem}.tab-container{overflow:hidden;padding:0 1rem 1rem;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:var(--namespace-radius-container)}.tab-container [data-component-part=tab-content]>[data-table-wrapper]:last-child{margin-bottom:0;padding-bottom:0}#content .katex-display>.katex{text-align:left}.compact-table table td{min-width:0}#navigation-items ul.sidebar-group>li.space-y-px+li.space-y-px{margin-top:.75rem}#navigation-items .my-2>.sidebar-group-header{margin-bottom:.625rem;font-size:.8125rem;line-height:1.625rem;font-weight:600;letter-spacing:-.02em;text-transform:none;opacity:1}#navigation-items ul.sidebar-group>li.space-y-px>button{font-size:.8125rem;font-weight:600;letter-spacing:-.02em;background-color:transparent}#navigation-items ul.sidebar-group>li.space-y-px>button:hover,#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button:hover{background-color:color-mix(in srgb,currentColor 6%,transparent)}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button,#navigation-items ul.sidebar-group>li.space-y-px>ul>li>a{padding-left:3rem!important;font-size:.8125rem;font-weight:400;letter-spacing:-.02em}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>ul>li[data-active-nav-item=true]>a,#navigation-items ul.sidebar-group>li.space-y-px>ul>li[data-active-nav-item=true]>a{color:#121516!important;background-color:rgb(18 21 22/6%)!important}.dark #navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>ul>li[data-active-nav-item=true]>a,.dark #navigation-items ul.sidebar-group>li.space-y-px>ul>li[data-active-nav-item=true]>a{color:#f4f4f5!important;background-color:rgb(255 255 255/8%)!important}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button{background-color:transparent}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button>div[class=\"h-[1lh]\"]:first-child{margin-left:-1.75rem}.dark #navigation-items img[src*=buildkite-mark]{filter:brightness(.7)}.dark img[src*=\"/icons/apple.svg\"]{filter:invert(1)}.dark img.tab-icon[src*=\"/icons/linux.svg\"]{filter:invert(.35) brightness(1.54)}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>ul>li>a{padding-left:4rem!important;font-size:.8125rem;font-weight:400;letter-spacing:-.02em}@media (min-width:1024px){#sidebar-content{width:calc(16.5rem + 10px)}#content-container{margin-left:calc(16.5rem + 10px)}#navbar{container-type:inline-size}#navbar .nav-tabs{position:fixed;top:0;left:20rem;height:3.5rem;column-gap:2rem}#navbar div:has(>div>.nav-tabs){justify-content:flex-end}@container (max-width: 69rem){#navbar .navbar-link:has(>a[href=\"https://namespace.so/changelog\\"\]){display:none}}}@media (min-width:1280px){#content-container{padding-right:1.5rem;padding-left:3rem}#content-container>div{column-gap:1.5rem;justify-content:flex-start}#content-area{width:calc(100% - 13.5rem);max-width:52rem;flex:none}#content-side-layout{width:15rem;max-width:15rem;flex-basis:15rem}#content-side-layout>div{width:15rem;padding-left:1rem}#content-side-layout>div>div{width:14rem}}@media (min-width:1700px){#content-container>div{justify-content:center}}"},{"filePath":"reference/github-actions/runner-configuration.css","content":""},{"filePath":"workspaces/access.css","content":""},{"filePath":"platform/workspaces/access.css","content":""},{"filePath":"reference/devbox-cli/desktop.css","content":""}],"page":{"pagePath":"bazel/execution","slug":"/bazel/execution","pageMetadata":{"title":"Bazel Remote Execution","sidebarTitle":"Remote Build Execution","description":null,"href":"/bazel/execution"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const BazelRbeDiagram=()=>{const NamespaceMark=({size=32})=>_jsx(`img`,{className:`ns-diagram-mark`,src:`/favicon.svg`,alt:``,width:size,height:size});const ClientMark=({size=32})=>_jsx(`span`,{className:`ns-diagram-mark ns-diagram-mark-terminal`,style:{width:size,height:size},children:_jsxs(`svg`,{width:Math.round(size*.55),height:Math.round(size*.55),viewBox:`0 0 24 24`,fill:`none`,\"aria-hidden\":`true`,children:[_jsx(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`,stroke:`currentColor`,strokeWidth:`1.8`}),_jsx(`path`,{d:`M7 10l3 3-3 3M13 16h4`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})]})});const SchedulerMark=({size=32})=>_jsx(`span`,{className:`ns-diagram-mark ns-diagram-mark-control`,style:{width:size,height:size},children:_jsxs(`svg`,{width:Math.round(size*.55),height:Math.round(size*.55),viewBox:`0 0 24 24`,fill:`none`,\"aria-hidden\":`true`,children:[_jsx(`circle`,{cx:`12`,cy:`6`,r:`2.5`,fill:`currentColor`}),_jsx(`circle`,{cx:`5`,cy:`18`,r:`2`,fill:`currentColor`}),_jsx(`circle`,{cx:`12`,cy:`18`,r:`2`,fill:`currentColor`}),_jsx(`circle`,{cx:`19`,cy:`18`,r:`2`,fill:`currentColor`}),_jsx(`path`,{d:`M12 8.5v3m0 0H5v3m7-3h7v3m-7-3v3`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`})]})});const WorkerMark=({size=32})=>_jsx(`span`,{className:`ns-diagram-mark ns-diagram-mark-worker`,style:{width:size,height:size},children:_jsxs(`svg`,{width:Math.round(size*.55),height:Math.round(size*.55),viewBox:`0 0 24 24`,fill:`none`,\"aria-hidden\":`true`,children:[_jsx(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`,stroke:`currentColor`,strokeWidth:`1.6`}),_jsx(`path`,{d:`M9.5 3v3m5-3v3m-5 12v3m5-3v3M3 9.5h3m-3 5h3m12-5h3m-3 5h3`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`})]})});const StorageMark=({size=32})=>_jsx(`span`,{className:`ns-diagram-mark ns-diagram-mark-control`,style:{width:size,height:size},children:_jsxs(`svg`,{width:Math.round(size*.55),height:Math.round(size*.55),viewBox:`0 0 24 24`,fill:`none`,\"aria-hidden\":`true`,children:[_jsx(`ellipse`,{cx:`12`,cy:`6`,rx:`7`,ry:`2.8`,stroke:`currentColor`,strokeWidth:`1.6`}),_jsx(`path`,{d:`M5 6v6c0 1.5 3.1 2.8 7 2.8s7-1.3 7-2.8V6`,stroke:`currentColor`,strokeWidth:`1.6`}),_jsx(`path`,{d:`M5 12v6c0 1.5 3.1 2.8 7 2.8s7-1.3 7-2.8v-6`,stroke:`currentColor`,strokeWidth:`1.6`})]})});const DiagramCard=({mark,label,sublabel,brand=false})=>_jsxs(`div`,{className:[`ns-diagram-card`,brand?`ns-diagram-card-brand`:``].filter(Boolean).join(` `),children:[mark,_jsxs(`div`,{className:`ns-diagram-card-copy`,children:[_jsx(`span`,{className:`ns-diagram-card-label`,children:label}),_jsx(`span`,{className:`ns-diagram-card-sublabel`,children:sublabel})]})]});const ZoneHeader=({owner,mark})=>_jsxs(`div`,{className:`ns-diagram-zone-header`,children:[mark,_jsx(`span`,{children:owner})]});const Zone=({brand=false,children})=>_jsx(`section`,{className:[`ns-diagram-zone`,brand?`ns-diagram-zone-brand`:``].filter(Boolean).join(` `),children});const VerticalConnector=({label,dashed=false,minHeight=70})=>_jsxs(`div`,{className:[`ns-diagram-vertical-connector`,dashed?`ns-diagram-connector-dashed`:``].filter(Boolean).join(` `),style:{minHeight},\"aria-hidden\":`true`,children:[_jsx(`div`,{className:`ns-diagram-vertical-line`}),_jsx(`div`,{className:`ns-diagram-arrow-down`}),_jsx(`span`,{children:label})]});const label=`A Bazel client submits actions through the Remote Execution API to Namespace, where the scheduler assigns work to workers that exchange inputs and outputs with shared storage.`;return _jsxs(`figure`,{className:`ns-diagram not-prose`,role:`img`,\"aria-label\":label,children:[_jsx(`div`,{className:`ns-diagram-grid-background`,\"aria-hidden\":`true`}),_jsxs(`div`,{className:`ns-diagram-content`,children:[_jsxs(Zone,{children:[_jsx(ZoneHeader,{owner:`Your build`,mark:_jsx(ClientMark,{size:14})}),_jsx(DiagramCard,{mark:_jsx(ClientMark,{size:36}),label:`Bazel`,sublabel:`Running on your machine, in CI, or in a Devbox`})]}),_jsx(`div`,{className:`ns-bazel-connector-inset`,children:_jsx(VerticalConnector,{label:`Remote Execution API`})}),_jsxs(Zone,{brand:true,children:[_jsx(ZoneHeader,{owner:`Namespace`,mark:_jsx(NamespaceMark,{size:14})}),_jsx(DiagramCard,{brand:true,mark:_jsx(SchedulerMark,{size:36}),label:`Scheduler`,sublabel:`Accepts requests and assigns actions to workers`}),_jsx(`div`,{className:`ns-bazel-connector-inset`,children:_jsx(VerticalConnector,{label:`assigns actions`,dashed:true,minHeight:56})}),_jsxs(`div`,{className:`ns-bazel-workers`,children:[_jsx(DiagramCard,{brand:true,mark:_jsx(WorkerMark,{size:36}),label:`Worker`,sublabel:`4 execution slots`}),_jsx(DiagramCard,{brand:true,mark:_jsx(WorkerMark,{size:36}),label:`Worker`,sublabel:`4 execution slots`}),_jsx(DiagramCard,{brand:true,mark:_jsx(WorkerMark,{size:36}),label:`Worker`,sublabel:`4 execution slots`})]}),_jsx(`div`,{className:`ns-bazel-connector-inset`,children:_jsx(VerticalConnector,{label:`action inputs \u0026 outputs`,minHeight:56})}),_jsx(DiagramCard,{brand:true,mark:_jsx(StorageMark,{size:36}),label:`Storage`,sublabel:`Content-addressable storage, shared with the Bazel cache`})]})]}),_jsx(`figcaption`,{className:`ns-diagram-caption`,children:label})]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Step,Steps,Table,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Run Bazel actions on Namespace compute instead of on the machine driving the\nbuild.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Remote Execution is now `,_jsx(_components.strong,{children:`generally available`}),`.`]})}),`\n`,_jsx(_components.p,{children:`Namespace runs your Bazel actions on workers it keeps running for your\nworkspace, so a build can spread across many workers without waiting for them to\nstart. Actions can also run on a platform other than the one driving Bazel,\nwhich is how a Linux host can build and test macOS artifacts.`}),`\n`,_jsxs(_components.p,{children:[`Remote Execution builds on the `,_jsx(_components.a,{href:`/bazel/cache`,children:`Namespace Bazel cache`}),`. The\nconfiguration written by `,_jsx(_components.code,{children:`nsc bazel setup`}),` includes both the remote executor and\nthe remote cache, so remotely executed actions share artifacts with your CI and\nlocal builds.`]}),`\n`,_jsx(Heading,{level:`2`,id:`getting-started`,children:`Getting started`}),`\n`,_jsxs(_components.p,{children:[`Remote Execution is enabled for every workspace. Use\n`,_jsx(_components.a,{href:`/reference/cli/bazel-setup`,children:_jsx(_components.code,{children:`nsc bazel setup`})}),` to create a Bazel\nconfiguration file for the execution cluster:`]}),`\n`,_jsxs(Steps,{titleSize:`h3`,children:[_jsxs(Step,{title:`Configure execution access`,id:`configure-execution-access`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bazel`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:``}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`})]}),`\n`]})})}),_jsx(_components.p,{children:`This command provisions the scheduler and storage components if needed and writes\na Bazel configuration file with the remote executor, remote cache, credentials,\nand recommended execution defaults.`})]}),_jsxs(Step,{title:`Run Bazel with remote execution`,id:`run-bazel-with-remote-execution`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazel`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:``}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //...`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`You can pass multiple `,_jsx(_components.code,{children:`--bazelrc`}),` flags if you need to combine Namespace’s\ngenerated configuration with your existing project configuration.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsx(_components.p,{children:`A Bazel Remote Execution cluster has three components:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Scheduler`}),`: accepts Bazel Remote Execution API requests and assigns actions to workers.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Storage`}),`: stores content-addressable storage (CAS) entries durably across the cluster.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Workers`}),`: execute Bazel actions.`]}),`\n`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`BazelRbeDiagram`,children:_jsx(BazelRbeDiagram,{})}),`\n`,_jsx(_components.p,{children:`Each worker advertises a fixed number of execution slots. A slot represents one\nunit of concurrent work, so a worker with four slots can run up to four actions\nat the same time. Namespace adds workers as a build requires more capacity.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-linux-host-to-linux-workers`,children:`Example: Linux host to Linux workers`}),`\n`,_jsx(_components.p,{children:`This example runs Bazel from a Linux host and executes actions on\nLinux workers. It uses a public Bazel repository so you can try the flow without\nchanging your own project first.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`git`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` clone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://github.com/bazelbuild/examples.git\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\`cd\`}),\_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` examples/cpp-tutorial/stage3`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bazel`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:``}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --key=examples-linux`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazel`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:``}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //...`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Actions without explicit platform properties are routed to Linux workers.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-linux-host-to-macos-workers`,children:`Example: Linux host to macOS workers`}),`\n`,_jsxs(_components.p,{children:[`Bazel can also route selected actions to macOS workers from a Linux client. The\n`,_jsx(_components.a,{href:`https://github.com/namespacelabs/linux-to-mac-rbe-demo\`,children:\`linux-to-mac-rbe-demo\`}),\`\\nrepository demonstrates that setup.`]}),`\n`,_jsxs(_components.p,{children:[`This example requires `,_jsx(_components.code,{children:`macos/arm64`}),` workers to be enabled for your workspace. If\nyou see an error such as `,_jsx(_components.code,{children:`no on-demand worker capacity configured for platform \"macos/arm64\"`}),`, reach out to the Namespace team to enable macOS worker capacity.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`git`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` clone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://github.com/namespacelabs/linux-to-mac-rbe-demo.git\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\`cd\`}),\_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` linux-to-mac-rbe-demo`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bazel`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:``}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --key=linux-to-mac-demo`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazelisk`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:``}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //DemoApp:DemoApp`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For your own targets, route an action to macOS by setting Bazel execution\nproperties on that target or platform, for example:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`exec_properties `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"OSFamily\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"macos\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Arch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"arm64\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Actions without macOS execution properties continue to run on the default Linux\nworkers, allowing one Bazel invocation to use both platforms.`}),`\n`,_jsx(Heading,{level:`2`,id:`remote-execution-from-a-devbox`,children:`Remote Execution from a Devbox`}),`\n`,_jsxs(_components.p,{children:[`You can enable Bazel Remote Execution on any `,_jsx(_components.a,{href:`/devbox`,children:`Devbox`}),`, including\none that already exists. Run setup from inside the Devbox, whether or not it was\ncreated with `,_jsx(_components.a,{href:`/bazel/cache#running-bazel-from-a-devbox`,children:`Bazel caching`}),`\nenabled.`]}),`\n`,_jsxs(Steps,{titleSize:`h3`,children:[_jsxs(Step,{title:`Create a Devbox`,id:`create-a-devbox`,children:[_jsxs(_components.p,{children:[`Point `,_jsx(_components.code,{children:`--checkout`}),` at the repository that holds your Bazel workspace, so the\nDevbox starts with the project already cloned:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`devbox`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --checkout=github.com/your-org/your-repo`})]}),`\n`]})})}),_jsx(_components.p,{children:`Skip this step if you already have a Devbox with your Bazel project checked out.`})]}),_jsxs(Step,{title:`Open a shell in the Devbox`,id:`open-a-shell-in-the-devbox`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`devbox`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ssh`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-devbox`})]}),`\n`]})})}),_jsx(_components.p,{children:`Run the remaining steps inside the Devbox, not on your own machine.`})]}),_jsxs(Step,{title:`Enable remote execution`,id:`enable-remote-execution`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bazel`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=/home/devbox/.bazelrc`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Remote execution `,_jsx(_components.code,{children:`--remote=true`}),` is on by default, so this writes both\nthe remote executor and the remote cache into the configuration. Pass\n`,_jsx(_components.code,{children:`--remote=false`}),` for a cache-only setup.`]}),_jsxs(Info,{children:[_jsxs(_components.p,{children:[`Devboxes store the path to the `,_jsx(_components.code,{children:`bazelrc`}),` in the `,_jsx(_components.code,{children:`BAZELRC`}),` environment variable, which lets scripts and later examples name the configuration without hardcoding the path. Check that it is set:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $BAZELRC`})]}),`\n`]})})}),_jsx(_components.p,{children:`If that comes back empty, set it yourself with:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'export BAZELRC=\"/home/devbox/.bazelrc\"'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /.bashrc`})]}),`\n`]})})})]})]}),_jsxs(Step,{title:`Run Bazel`,id:`run-bazel`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazel`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //...`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`/home/devbox/.bazelrc`}),` is the `,_jsx(_components.code,{children:`devbox`}),` user’s home `,_jsx(_components.code,{children:`bazelrc`}),`, so Bazel picks it\nup with no flags.`]})]})]}),`\n`,_jsxs(_components.p,{children:[`Keep repository-specific execution settings in a `,_jsx(_components.code,{children:`bazelrc`}),` checked into your\nrepository rather than editing the generated one, since setup overwrites it each\ntime it runs. Combine the two with repeated `,_jsx(_components.code,{children:`--bazelrc`}),` flags, using the\n`,_jsx(_components.code,{children:`BAZELRC`}),` environment variable that the Devbox sets to the generated file:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazel`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BAZELRC`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=tools/bazelrc/rbe.bazelrc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //...`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`remote-execution-from-ci`,children:`Remote Execution from CI`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Authenticating Remote Execution with a revocable token requires `,_jsx(_components.strong,{children:`nsc v0.0.544`}),` or later. Run `,_jsx(_components.code,{children:`nsc version ensure --at_least 0.0.544`}),` to check and update the CLI if needed.`]})}),`\n`,_jsxs(_components.p,{children:[`By default, `,_jsx(_components.code,{children:`nsc bazel setup`}),` uses your interactive login and writes a\nbazelrc that authenticates to the cluster with a short-lived mTLS client\ncertificate. For CI/CD pipelines, automation, or any environment without an\ninteractive login, you can instead authenticate with a\n`,_jsx(_components.a,{href:`/reference/cli/token-create`,children:`revocable token`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Revocable tokens are long-lived but can be revoked at any time from\n`,_jsx(_components.a,{href:`https://cloud.namespace.so/user/sessions\`,children:\`cloud.namespace.so/user/sessions\`}),\` or\nwith `,_jsx(_components.a,{href:`/reference/cli/token-revoke`,children:_jsx(_components.code,{children:`nsc token revoke`})}),`.`]}),`\n`,_jsxs(Steps,{titleSize:`h3`,children:[_jsxs(Step,{title:`Create a revocable token`,id:`create-a-revocable-token`,children:[_jsxs(_components.p,{children:[`Use `,_jsx(_components.a,{href:`/reference/cli/bazel-create-token`,children:_jsx(_components.code,{children:`nsc bazel create-token`})}),` to create\na token with the permissions required for Remote Execution and write it to a\nfile:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bazel`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` create-token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --token`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rbe-token.json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --expires_in`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 10d`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`--expires_in`}),` to a duration of up to 365 days.`]})]}),_jsxs(Step,{title:`Generate a bazelrc with the token`,id:`generate-a-bazelrc-with-the-token`,children:[_jsx(_components.p,{children:`Pass the token file to the setup command. This provisions a cluster that uses\nthe revocable token to obtain short-lived credentials:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` bazel`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` setup`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --token`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rbe-token.json`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=namespace.bazelrc`})]}),`\n`]})})})]}),_jsx(Step,{title:`Run Bazel with remote execution`,id:`run-bazel-with-remote-execution-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazel`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //...`})]}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`additional-configuration-options`,children:`Additional configuration options`}),`\n`,_jsx(_components.p,{children:`Bazel execution properties can reserve worker CPU capacity and select the isolation mode on Linux workers:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`exec_properties `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cpu\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_action_isolation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sandboxed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_requires_network\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"true\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`--remote_default_exec_properties`}),` to apply a property to actions that do\nnot override it:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazel`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:``}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //...`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --remote_default_exec_properties=cpu=2`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --remote_default_exec_properties=namespace_action_isolation=sandboxed`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`reserve-cpu-capacity`,children:`Reserve CPU capacity`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`cpu`}),` property tells the scheduler how much CPU capacity to\nreserve while an action runs. Values can be whole or fractional numbers, such\nas `,_jsx(_components.code,{children:`\"2\"`}),` or `,_jsx(_components.code,{children:`\"0.5\"`}),`. The scheduler considers both execution slots and CPU\nreservations when assigning concurrent actions to a worker.`]}),`\n`,_jsx(_components.p,{children:`The reservation is a scheduling input, not a CPU limit applied to the action.\nAn omitted or zero value does not reserve CPU capacity beyond the action’s\nexecution slot.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`resources:cpu`}),` is accepted as an alternative property name.`]}),`\n`,_jsx(Heading,{level:`3`,id:`select-action-isolation`,children:`Select action isolation`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`namespace_action_isolation`}),` property controls how a Linux worker runs an\naction:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sandboxed`})}),_jsx(_components.td,{children:`Runs the action in an isolated filesystem, process, network, mount, UTS, and IPC environment.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`none`})}),_jsx(_components.td,{children:`Runs the action directly in the worker environment without additional per-action sandboxing.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Omitted`}),_jsx(_components.td,{children:`Uses the workspace default setting.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The workspace default is `,_jsx(_components.code,{children:`none`}),` unless configured otherwise.\nSandboxed isolation is supported only on Linux workers at the moment.\nContact `,_jsx(_components.a,{href:`mailto:support@namespace.so`,children:`support@namespace.so`}),` to change the setting.`]}),`\n`,_jsxs(_components.p,{children:[`Sandboxed actions receive an isolated, loopback-only network namespace by\ndefault. Set `,_jsx(_components.code,{children:`namespace_requires_network`}),` to `,_jsx(_components.code,{children:`true`}),` on an action that needs\nnetwork access. The action keeps its filesystem, process, mount, UTS, and IPC\nisolation, but shares the worker’s network namespace. Omit the property for\nactions that do not need network access.`]}),`\n`,_jsx(Heading,{level:`2`,id:`custom-worker-pools`,children:`Custom worker pools`}),`\n`,_jsx(_components.p,{children:`Named worker pools let actions select a worker machine type, custom base image,\nand startup configuration.\nNamespace creates a pool when its first action is queued, starts workers for it\non demand, and routes only actions that name that pool to those workers. Actions\nwithout a pool use the workspace’s default workers.`}),`\n`,_jsxs(_components.p,{children:[`To use custom worker pools, define each pool as a Bazel execution platform. The\nplatform’s `,_jsx(_components.code,{children:`exec_properties`}),` describe the properties of the pool. A constraint\nvalue then lets targets select that execution platform with\n`,_jsx(_components.code,{children:`exec_compatible_with`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`45`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`45`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`constraint_setting(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"worker_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`constraint_value(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"compile_pool_constraint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` constraint_setting`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \":worker_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`constraint_value(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"high_memory_pool_constraint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` constraint_setting`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \":worker_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`platform(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"compile_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` constraint_values`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\":compile_pool_constraint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` exec_properties`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"compile\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_pool_machine_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"linux/amd64:16x32\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`platform(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"high_memory_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` constraint_values`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\":high_memory_pool_constraint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` exec_properties`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high-memory\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_pool_machine_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"linux/amd64:16x64\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`genrule(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"compile_probe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` outs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"compile_probe.txt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` cmd`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"printf compile > $@\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` exec_compatible_with`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\":compile_pool_constraint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`genrule(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"high_memory_probe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` outs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high_memory_probe.txt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` cmd`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"printf high-memory > $@\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` exec_compatible_with`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\":high_memory_pool_constraint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Register the pool platforms when invoking Bazel:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`bazel`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --bazelrc=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`~`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`/.namespace.bazelrc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` //...`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --extra_execution_platforms=//:compile_pool,//:high_memory_pool`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can add `,_jsx(_components.code,{children:`--extra_execution_platforms`}),` to your project bazelrc instead of\npassing it on every invocation.`]}),`\n`,_jsxs(_components.p,{children:[`The machine type uses the format `,_jsx(_components.code,{children:`\u003cos>/\u003carch>:\u003ccpu>x\u003cmemory>`}),`. For example,\n`,_jsx(_components.code,{children:`linux/amd64:16x64`}),` selects a Linux AMD64 worker with 16 vCPUs and 64 GB of\nmemory. See `,_jsx(_components.a,{href:`/architecture/compute/machine-shapes`,children:`Machine Shapes`}),` for\nsupported CPU and memory configurations.`]}),`\n`,_jsx(_components.p,{children:`The following execution properties define a pool:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Property`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`namespace_pool`})}),_jsx(_components.td,{children:`Required property that names the pool. Use different names for different configurations.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`namespace_pool_machine_type`})}),_jsxs(_components.td,{children:[`Required property of the format `,_jsx(_components.code,{children:`\u003cos>/\u003carch>:\u003ccpu>x\u003cmemory>`}),`. Examples include `,_jsx(_components.code,{children:`linux/arm64:8x16`}),` and `,_jsx(_components.code,{children:`macos/arm64:6x14`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`namespace_pool_worker_image`})}),_jsx(_components.td,{children:`Overrides the worker base image. When omitted, the pool will use the default worker image.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`namespace_pool_startup_script`})}),_jsx(_components.td,{children:`Script that runs once on every worker before it registers. Requires direct execution.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Every execution platform that uses the same pool name must provide the same pool\ndefinition. The scheduler rejects an action if any property conflicts with the\npool’s existing definition.`}),`\n`,_jsx(Heading,{level:`3`,id:`configure-workers-at-startup`,children:`Configure workers at startup`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`namespace_pool_startup_script`}),` to an arbitrary shell script that Namespace should\nrun once on every worker in the pool. The script runs after image preparation\nand before the worker registers with the scheduler, so no actions are assigned\nuntil it completes successfully.`]}),`\n`,_jsx(_components.p,{children:`This example prepares a cache directory on every macOS worker in the pool:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`platform(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"configured_macos_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` exec_properties`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_pool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"configured-macos\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_pool_machine_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"macos/arm64:6x14\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_pool_startup_script\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`set -eu`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`mkdir -p \"$HOME/.cache/my-build\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"namespace_action_isolation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"none\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Startup scripts are supported on Linux and macOS workers with direct execution.\nThey are not supported with sandboxed execution because each action uses a\nseparate, disposable filesystem. If the workspace default is sandboxed, set\n`,_jsx(_components.code,{children:`namespace_action_isolation`}),` to `,_jsx(_components.code,{children:`none`}),` on the execution platform as shown above.`]}),`\n`,_jsx(_components.p,{children:`If the script exits with a non-zero status, the worker does not register or\nhandle actions. Environment variables exported by the script do not persist\nafter it exits, so write configuration to disk when actions need to consume it.`}),`\n`,_jsx(Heading,{level:`2`,id:`custom-worker-base-images`,children:`Custom worker base images`}),`\n`,_jsx(_components.p,{children:`By default, actions run using one of Namespace’s managed worker images. If your\nactions need extra tools, libraries, or a specific base environment, you can run\nthem inside your own container image instead.`}),`\n`,_jsxs(_components.p,{children:[`Custom images are selected per action through the standard Bazel\n`,_jsx(_components.code,{children:`container-image`}),` execution property.`]}),`\n`,_jsx(_components.p,{children:`A few requirements apply:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The image reference `,_jsx(_components.strong,{children:`must be pinned to an immutable digest`}),`\n(`,_jsx(_components.code,{children:`repo@sha256:...`}),`). Tags are rejected.`]}),`\n`,_jsxs(_components.li,{children:[`The image `,_jsx(_components.strong,{children:`must be optimized`}),` before it can be used. Namespace converts the\nimage into a fast-booting disk variant.`]}),`\n`,_jsxs(_components.li,{children:[`The worker image must be hosted in the Namespace container registry `,_jsx(_components.code,{children:`nscr.io`}),`.`]}),`\n`,_jsx(_components.li,{children:`Custom images are supported on Linux workers only.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`build-push-and-optimize-a-custom-image`,children:`Build, push, and optimize a custom image`}),`\n`,_jsxs(Steps,{titleSize:`h3`,children:[_jsxs(Step,{id:`build-and-push-your-image`,title:_jsx(_components.span,{children:`Build and push your image`}),children:[_jsxs(_components.p,{children:[`Write a `,_jsx(_components.code,{children:`Dockerfile`}),` that starts from any Linux base and adds the tools your\nactions need. Authenticate against `,_jsx(_components.code,{children:`nscr.io`}),` with\n`,_jsx(_components.a,{href:`/reference/cli/docker-login`,children:_jsx(_components.code,{children:`nsc docker login`})}),`, then build and push it\nwith `,_jsx(_components.a,{href:`/reference/cli/build`,children:_jsx(_components.code,{children:`nsc build`})}),` for the worker architecture\n(`,_jsx(_components.code,{children:`linux/amd64`}),` or `,_jsx(_components.code,{children:`linux/arm64`}),`):`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` build`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -t`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` nscr.io/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`tenan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`t`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/my-worker:latest`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --platform`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` linux/amd64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --push`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Already have an image elsewhere? Use\n`,_jsx(_components.a,{href:`/reference/cli/base-image-upload`,children:_jsx(_components.code,{children:`nsc base-image upload`})}),` to pull it and\npush it into your `,_jsx(_components.code,{children:`nscr.io`}),` registry instead:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` base-image`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` upload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`source-imag`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`e`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my-worker:latest`})]}),`\n`]})})})]}),_jsxs(Step,{id:`pin-it-to-an-immutable-digest`,title:_jsx(_components.span,{children:`Pin it to an immutable digest`}),children:[_jsx(_components.p,{children:`The scheduler requires a digest, not a tag. Resolve the digest your push produced:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` inspect`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --format`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{{index .RepoDigests 0}}'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` nscr.io/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`tenan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`t`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/my-worker:latest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nscr.io/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003ctenant>/my-worker@sha256:\u003cdigest>`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Use that `,_jsx(_components.code,{children:`repo@sha256:\u003cdigest>`}),` reference everywhere below.`]})]}),_jsxs(Step,{id:`optimize-the-image`,title:_jsx(_components.span,{children:`Optimize the image`}),children:[_jsxs(_components.p,{children:[`Optimize the pinned image with\n`,_jsx(_components.a,{href:`/reference/cli/base-image-optimize`,children:_jsx(_components.code,{children:`nsc base-image optimize`})}),`. This step blocks until the optimized variant is ready:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nsc`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` base-image`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` optimize`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --image_ref`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` nscr.io/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`tenan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`t`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/my-worker@sha256:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`diges`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`t`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})}),_jsx(_components.p,{children:`You only need to optimize a given digest once. Pushing a new image with a new digest requires optimizing that new digest.`}),_jsx(Info,{children:_jsxs(_components.p,{children:[`Optimizing a base image from a GitHub Actions job requires the job to run with additional permission grants. Pass the `,_jsx(_components.code,{children:`baseimage:*:*`}),` grant as a `,_jsx(_components.code,{children:`permissions.additional_grant`}),` feature setting on the runner.`]})}),_jsx(_components.p,{children:`With a runner profile, append it to the profile name:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`jobs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` rbe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` runs-on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`namespace-profile-foobar;permissions.additional_grant=baseimage:*:*`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`With a machine label, pass it through the `,_jsx(_components.code,{children:`namespace-features:`}),` label instead:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`jobs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` rbe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` runs-on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`nscloud-ubuntu-22.04-amd64-4x8-with-features`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`namespace-features:permissions.additional_grant=baseimage:*:*`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`See\n`,_jsx(_components.a,{href:`/solutions/github-actions/runner-controls`,children:`Configuring Features and Overrides`}),`\nfor the full syntax of feature settings, and\n`,_jsx(_components.a,{href:`/solutions/github-actions/runner-controls/access-levels`,children:`Access Level`}),`\nfor restricting what a runner can do.`]}),_jsxs(_components.p,{children:[`This grant is only needed when optimizing from a GitHub Actions job. Running\n`,_jsx(_components.code,{children:`nsc base-image optimize`}),` from a local machine outside of Namespace does not\nrequire it.`]})]}),_jsx(Step,{id:`use-it-in-your-build`,title:_jsx(_components.span,{children:`Use it in your build`}),children:_jsxs(_components.p,{children:[`Point your actions at the custom worker image with the\n`,_jsx(_components.code,{children:`container-image`}),` execution property (see the next sections).`]})})]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`If you run a build against an image that has not been optimized yet, the scheduler rejects the affected actions with an error telling you the image is not optimized. Run `,_jsx(_components.code,{children:`nsc base-image optimize`}),` for that digest.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`use-the-custom-image`,children:`Use the custom image`}),`\n`,_jsxs(_components.p,{children:[`Set the `,_jsx(_components.code,{children:`container-image`}),` execution property on a specific target or platform so\nonly those actions run with the custom worker image:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`exec_properties `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"container-image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"docker://\u003crepo>@sha256:\u003cdigest>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`docker://`}),` scheme prefix is optional. To apply an image through a custom\nworker pool instead, set `,_jsx(_components.code,{children:`namespace_pool_worker_image`}),` as described in\n`,_jsx(_components.a,{href:`#custom-worker-pools`,children:`Custom worker pools`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`run-preparation-scripts-at-worker-startup`,children:`Run preparation scripts at worker startup`}),`\n`,_jsxs(_components.p,{children:[`A custom worker image can ship preparation scripts that run once before the\nworker starts handling any actions. These hooks handle setup that must run on\nevery worker boot, such as mounting an external `,_jsx(_components.code,{children:`/nix`}),` store or seeding caches.`]}),`\n`,_jsxs(_components.p,{children:[`Place executable files in `,_jsx(_components.code,{children:`/etc/namespace/prepare.d`}),` inside your image. On\nstartup, the worker runs every executable file in that directory in lexical\norder (e.g. `,_jsx(_components.code,{children:`10-mount.sh`}),` before `,_jsx(_components.code,{children:`20-warmup.sh`}),`). Non-executable files and\nsubdirectories are skipped.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Preparation scripts are `,_jsx(_components.strong,{children:`critical`}),`: they run at the very start, and if any script exits non-zero the worker fails to start and handles no work.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`observability`,children:`Observability`}),`\n`,_jsxs(_components.p,{children:[`Namespace records every invocation that runs through remote execution. Inspect\nthem from the `,_jsx(_components.a,{href:`https://cloud.namespace.so/workspace/bazel/invocations\`,children:\`Bazel invocations`}),`\npage, or from the CLI with\n`,_jsx(_components.a,{href:`/reference/cli/bazel-invocation-list`,children:_jsx(_components.code,{children:`nsc bazel invocation list`})}),` and\n`,_jsx(_components.a,{href:`/reference/cli/bazel-invocation-report`,children:_jsx(_components.code,{children:`nsc bazel invocation report`})}),`.`]}),`\n`,_jsx(_components.p,{children:`Reports carry worker assignment and timing, queue times, and hydration times\nalongside the usual action and target data, which makes them the place to look\nwhen a build fails for a reason Bazel cannot see.`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/bazel/observability`,children:`Bazel observability`}),` for the full workflow,\nincluding how to analyze a report with an agent.`]}),`\n`,_jsx(_components.p,{children:`Future reports will also include operation joins, which indicate whether an\ninvocation joins action invocations from other invocations, and hot or warm\ncache information.`}),`\n`,_jsx(Heading,{level:`2`,id:`current-caveats`,children:`Current caveats`}),`\n`,_jsx(_components.p,{children:`Remote Execution has the following current limitations:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Action isolation within macOS workers is not available yet.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If any of these caveats block your use case, contact `,_jsx(_components.a,{href:`mailto:support@namespace.so`,children:`support@namespace.so`}),`\nso we can help find an appropriate solution.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{BazelRbeDiagram,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Bazel Remote Execution","sidebarTitle":"Remote Build Execution","description":null,"href":"/bazel/execution"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[154,5360,"null;function _creat"]]},"mdxExtracts":{"tableOfContents":[{"title":"Getting started","slug":"getting-started","depth":2,"children":[{"title":"Configure execution access","slug":"configure-execution-access","depth":3,"children":[]},{"title":"Run Bazel with remote execution","slug":"run-bazel-with-remote-execution","depth":3,"children":[]}]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Example: Linux host to Linux workers","slug":"example-linux-host-to-linux-workers","depth":2,"children":[]},{"title":"Example: Linux host to macOS workers","slug":"example-linux-host-to-macos-workers","depth":2,"children":[]},{"title":"Remote Execution from a Devbox","slug":"remote-execution-from-a-devbox","depth":2,"children":[{"title":"Create a Devbox","slug":"create-a-devbox","depth":3,"children":[]},{"title":"Open a shell in the Devbox","slug":"open-a-shell-in-the-devbox","depth":3,"children":[]},{"title":"Enable remote execution","slug":"enable-remote-execution","depth":3,"children":[]},{"title":"Run Bazel","slug":"run-bazel","depth":3,"children":[]}]},{"title":"Remote Execution from CI","slug":"remote-execution-from-ci","depth":2,"children":[{"title":"Create a revocable token","slug":"create-a-revocable-token","depth":3,"children":[]},{"title":"Generate a bazelrc with the token","slug":"generate-a-bazelrc-with-the-token","depth":3,"children":[]},{"title":"Run Bazel with remote execution","slug":"run-bazel-with-remote-execution-2","depth":3,"children":[]}]},{"title":"Additional configuration options","slug":"additional-configuration-options","depth":2,"children":[{"title":"Reserve CPU capacity","slug":"reserve-cpu-capacity","depth":3,"children":[]},{"title":"Select action isolation","slug":"select-action-isolation","depth":3,"children":[]}]},{"title":"Custom worker pools","slug":"custom-worker-pools","depth":2,"children":[{"title":"Configure workers at startup","slug":"configure-workers-at-startup","depth":3,"children":[]}]},{"title":"Custom worker base images","slug":"custom-worker-base-images","depth":2,"children":[{"title":"Build, push, and optimize a custom image","slug":"build-push-and-optimize-a-custom-image","depth":3,"children":[]},{"title":"Use the custom image","slug":"use-the-custom-image","depth":3,"children":[]},{"title":"Run preparation scripts at worker startup","slug":"run-preparation-scripts-at-worker-startup","depth":3,"children":[]}]},{"title":"Observability","slug":"observability","depth":2,"children":[]},{"title":"Current caveats","slug":"current-caveats","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/namespace-labs/fa018fe02fd436c8/navigation.js","/docs/_mintlify/custom/namespace-labs/4276600b7cb636ff/legacy-anchor-redirects.js"],"subdomain":"namespace-labs","siteName":"Namespace Documentation","title":"Bazel Remote Execution - Namespace Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T10:46:18.801Z","gitLastModified":"2026-09-15T20:07:03.000Z","originalFileLocation":"bazel/execution.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Namespace Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Bazel Remote Execution - Namespace Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Namespace Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://namespace.so/docs/bazel/execution\\">\\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://namespace-labs.mintlify.app/\_mintlify/api/og/v2?division=Bazel\\u0026amp;title=Bazel+Remote+Execution\\u0026amp;theme=1f89d53762a6d5304d1c63c4\\u0026amp;signature=83e7bf0dfbc05d0838c06eaf77cf7d2f2d55137a426ed2b58a09ff7053cd9164\\">\\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Bazel Remote Execution - Namespace Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://namespace-labs.mintlify.app/\_mintlify/api/og/v2?division=Bazel\\u0026amp;title=Bazel+Remote+Execution\\u0026amp;theme=1f89d53762a6d5304d1c63c4\\u0026amp;signature=83e7bf0dfbc05d0838c06eaf77cf7d2f2d55137a426ed2b58a09ff7053cd9164\\">\\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Namespace Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1C32FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://namespace.so/docs/bazel/execution\\">\\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/bazel/execution.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\\",\\"@graph\\":\[{\\"@type\\":\\"Organization\\",\\"@id\\":\\"https://namespace.so/#organization\\",\\"name\\":\\"Namespace Documentation\",\"url\":\"https://namespace.so\\",\\"logo\\":{\\"@type\\":\\"ImageObject\\",\\"url\\":\\"https://mintcdn.com/namespace-labs/qOJQ7kaWRgoS8lyv/logo-light.svg?fit=max\\u0026auto=format\\u0026n=qOJQ7kaWRgoS8lyv\\u0026q=85\\u0026s=6827b0c81c335badc1cef13b83383e1d\\"}},{\\"@type\\":\\"WebSite\\",\\"@id\\":\\"https://namespace.so/docs#website\\",\\"name\\":\\"Namespace Documentation\",\"url\":\"https://namespace.so/docs\\",\\"publisher\\":{\\"@id\\":\\"https://namespace.so/#organization\\"}},{\\"@type\\":\\"WebPage\\",\\"@id\\":\\"https://namespace.so/docs/bazel/execution#webpage\\",\\"url\\":\\"https://namespace.so/docs/bazel/execution\\",\\"name\\":\\"Bazel Remote Execution\",\"dateModified\":\"2026-09-15T20:07:03.000Z\",\"isPartOf\":{\"@id\":\"https://namespace.so/docs#website\\"},\\"breadcrumb\\":{\\"@id\\":\\"https://namespace.so/docs/bazel/execution#breadcrumb\\"}},{\\"@type\\":\\"BreadcrumbList\\",\\"@id\\":\\"https://namespace.so/docs/bazel/execution#breadcrumb\\",\\"itemListElement\\":\[{\\"@type\\":\\"ListItem\\",\\"position\\":1,\\"name\\":\\"Products\\",\\"item\\":\\"https://namespace.so/docs/solutions/github-actions/index\\"},{\\"@type\\":\\"ListItem\\",\\"position\\":2,\\"name\\":\\"Bazel\\",\\"item\\":\\"https://namespace.so/docs/bazel/index\\"},{\\"@type\\":\\"ListItem\\",\\"position\\":3,\\"name\\":\\"Bazel Remote Execution\",\"item\":\"https://namespace.so/docs/bazel/execution\\"}\]},{\\"@type\\":\[\\"Article\\",\\"TechArticle\\"\],\\"@id\\":\\"https://namespace.so/docs/bazel/execution#article\\",\\"headline\\":\\"Bazel Remote Execution\",\"name\":\"Bazel Remote Execution\",\"url\":\"https://namespace.so/docs/bazel/execution\\",\\"mainEntityOfPage\\":{\\"@id\\":\\"https://namespace.so/docs/bazel/execution#webpage\\"},\\"dateModified\\":\\"2026-09-15T20:07:03.000Z\\",\\"publisher\\":{\\"@id\\":\\"https://namespace.so/#organization\\"},\\"isPartOf\\":{\\"@id\\":\\"https://namespace.so/docs#website\\"}}\]}\\u003c/script>\\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\\",\\"@type\\":\\"WebSite\\",\\"name\\":\\"Namespace Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\\"}}\\u003c/script>","siteName":"Namespace Documentation","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"history","href":"https://namespace.so/changelog"},{"anchor":"Trust Center (SOC2)","icon":"shield-check","href":"https://trust.namespace.so/"},{"anchor":"Status","icon":"activity","href":"https://namespace-status.com/"},{"anchor":"Support","icon":"message-circle","href":"https://namespace.so/support"}\]},"products":\[{"product":"Products","description":"Turnkey products built on the Namespace platform","tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Namespace Documentation","sidebarTitle":"Overview","href":""},{"group":"Products","pages":[{"group":"GitHub Actions","icon":"github","pages":[{"title":"Accelerate your GitHub Actions with Namespace","sidebarTitle":"Getting Started","href":"/solutions/github-actions/index"},{"group":"Cache Volumes","pages":[{"title":"Caching in GitHub Actions","sidebarTitle":"Overview","href":"/solutions/github-actions/caching/index"},{"title":"Container Images","href":"/solutions/github-actions/caching/container-images"},{"title":"Git Checkouts","href":"/solutions/github-actions/caching/git-checkouts"},{"title":"Toolchains","sidebarTitle":"Toolchains","href":"/solutions/github-actions/caching/toolchains"},{"title":"Actions","sidebarTitle":"Actions","href":"/solutions/github-actions/caching/actions"},{"title":"Build System Integrations","sidebarTitle":"Build Systems","href":"/solutions/github-actions/caching/build-systems"},{"title":"Troubleshooting cache volumes","sidebarTitle":"Troubleshooting","href":"/solutions/github-actions/caching/troubleshooting"}]},{"title":"Fast repository checkouts with Git snapshots","sidebarTitle":"Git Snapshots","href":"/solutions/github-actions/git-snapshots"},{"title":"Optimizing Docker build performance","sidebarTitle":"Docker Builds","href":"/solutions/github-actions/docker-builds"},{"title":"Custom base images for GitHub Actions","sidebarTitle":"Custom Base Images","href":"/solutions/github-actions/custom-base-images/index"},{"group":"Debugging","pages":[{"title":"Debugging GitHub Actions","sidebarTitle":"Overview","href":"/solutions/github-actions/debugging/index"},{"title":"Interactive Access","href":"/solutions/github-actions/debugging/interactive-access"},{"title":"Remote Display","href":"/solutions/github-actions/debugging/remote-display"},{"title":"Performance Metrics","href":"/solutions/github-actions/debugging/performance-metrics"},{"title":"Advanced Logging","href":"/solutions/github-actions/debugging/logging"},{"title":"Out of memory (OOM) detection","sidebarTitle":"OOM Detection","href":"/solutions/github-actions/debugging/oom-detection"},{"title":"Crash Dumps","href":"/solutions/github-actions/debugging/crash-dumps"},{"title":"Queue Time","href":"/solutions/github-actions/debugging/queue-time"}]},{"group":"Runner Controls","pages":[{"title":"Runner Controls","sidebarTitle":"Overview","href":"/solutions/github-actions/runner-controls"},{"title":"Concurrent runners","href":"/solutions/github-actions/runner-controls/concurrent-runners"},{"title":"Job Ordering \u0026 Priority","sidebarTitle":"Job Ordering","href":"/solutions/github-actions/runner-controls/job-ordering"},{"title":"Privileged Workflows","sidebarTitle":"Privileged Workflows","href":"/solutions/github-actions/runner-controls/privileged-workflows"},{"title":"Landlock","sidebarTitle":"Landlock","href":"/solutions/github-actions/runner-controls/landlock"},{"title":"Swap Space","sidebarTitle":"Swap Space","href":"/solutions/github-actions/runner-controls/swap"},{"title":"Tailscale","sidebarTitle":"Tailscale","href":"/solutions/github-actions/runner-controls/tailscale"},{"title":"Access Levels","sidebarTitle":"Access Levels","href":"/solutions/github-actions/runner-controls/access-levels"},{"title":"Running jobs in containers","sidebarTitle":"Containerized Jobs","href":"/solutions/github-actions/runner-controls/containerized-jobs"}]},{"title":"Optimizing Usage","href":"/solutions/github-actions/optimizing-usage"},{"title":"Runner Labels","sidebarTitle":"Runner Labels","href":"/reference/github-actions/runner-configuration"},{"group":"Actions","expanded":false,"pages":[{"title":"nscloud-setup","href":"/reference/github-actions/nscloud-setup"},{"title":"nscloud-setup-buildx-action","href":"/reference/github-actions/nscloud-setup-buildx-action"},{"title":"nscloud-cluster-action","href":"/reference/github-actions/nscloud-cluster-action"},{"title":"nscloud-cache-action","href":"/reference/github-actions/nscloud-cache-action"},{"title":"nscloud-checkout-action","href":"/reference/github-actions/nscloud-checkout-action"},{"title":"nscloud-expose-kubernetes-action","href":"/reference/github-actions/nscloud-expose-kubernetes-action"},{"title":"breakpoint-action","href":"/reference/github-actions/breakpoint"},{"title":"upload-artifact","href":"/reference/github-actions/upload-artifact"},{"title":"download-artifact","href":"/reference/github-actions/download-artifact"},{"title":"setup-turbocache","href":"/reference/github-actions/setup-turbocache"}]}]},{"group":"Devboxes","icon":"container","pages":[{"title":"High-Performance Developer Environments with Devboxes","sidebarTitle":"Getting Started","href":"/devbox/index"},{"group":"Managing Devboxes","expanded":false,"pages":[{"title":"Devbox Lifecycle","sidebarTitle":"Lifecycle","href":"/devbox/lifecycle"},{"title":"Devbox Blueprints","sidebarTitle":"Blueprints","href":"/devbox/blueprint"},{"title":"Devbox Services","sidebarTitle":"Services","href":"/devbox/services"},{"title":"Shareable URLs","href":"/devbox/url"},{"title":"Custom Images","href":"/devbox/images"}]},{"group":"Working in a Devbox","expanded":false,"pages":[{"title":"Connecting to a Devbox","sidebarTitle":"SSH \u0026 Sessions","href":"/devbox/connecting"},{"title":"Executing Commands","href":"/devbox/exec"},{"title":"Running long tasks","sidebarTitle":"Long Running Tasks","href":"/guides/devbox/long-running-tasks"},{"title":"Computer Controls","sidebarTitle":"Computer Use","href":"/devbox/computer-use"},{"title":"Remote Desktop","sidebarTitle":"Remote Desktop","href":"/devbox/remote-desktop"},{"title":"Open IDE","href":"/devbox/ides"}]},{"group":"Managed Agents","tag":"Integrations","expanded":false,"pages":[{"title":"Amp Orbs","sidebarTitle":"Amp Orbs","href":"/integrations/amp"},{"title":"Claude Managed Agents","sidebarTitle":"Claude Managed Agents","href":"/integrations/claude"},{"title":"Cursor Cloud Agents","sidebarTitle":"Cursor Cloud Agents","href":"/integrations/cursor"},{"title":"Devin on Devboxes","sidebarTitle":"Devin","href":"/integrations/devin"}]}]},{"group":"Bazel","icon":"hammer","pages":[{"title":"Speed up your Bazel builds with Namespace","sidebarTitle":"Introduction","href":"/bazel/index"},{"title":"Bazel cache","sidebarTitle":"Caching","description":null,"href":"/bazel/cache"},{"title":"Bazel Remote Execution","sidebarTitle":"Remote Build Execution","href":"/bazel/execution"},{"title":"Bazel observability","sidebarTitle":"Observability","description":null,"href":"/bazel/observability"}]},{"group":"Docker Builders","icon":"container","pages":[{"title":"Speed up your Docker Builds with Namespace","sidebarTitle":"Getting Started","href":"/solutions/docker-builders/index"},{"title":"Container Registry","href":"/solutions/docker-builders/registry"},{"title":"Docker Build Observability","sidebarTitle":"Tracing \u0026 Logs","href":"/solutions/docker-builders/tracing-and-logs"}]},{"group":"Buildkite Agents","icon":"workflow","pages":[{"title":"Run Buildkite Jobs on Namespace","sidebarTitle":"Getting Started","href":"/solutions/buildkite-agents/index"},{"title":"Managing Buildkite Queues","sidebarTitle":"Managing Queues","href":"/solutions/buildkite-agents/managing-queues"},{"title":"Configure Buildkite Agents","sidebarTitle":"Configuration","href":"/solutions/buildkite-agents/configuration"},{"title":"Fast repository checkouts with Git snapshots","sidebarTitle":"Git Snapshots","href":"/solutions/buildkite-agents/git-snapshots"}]}]},{"group":"Platform","pages":[{"group":"Compute","icon":"cpu","pages":[{"title":"Compute Platform","sidebarTitle":"Overview","href":"/architecture/compute/index"},{"title":"Linux","href":"/architecture/compute/linux"},{"title":"macOS","href":"/architecture/compute/macos"},{"title":"Windows","href":"/architecture/compute/windows"},{"title":"Observability","href":"/architecture/compute/observability"},{"title":"SSH / Remote Display with Namespace Compute","sidebarTitle":"SSH / Remote Display","href":"/architecture/compute/ssh-remote-display"},{"title":"Machine Shapes","href":"/architecture/compute/machine-shapes"},{"title":"Resource Limits","href":"/architecture/compute/resource-limits"}]},{"group":"Storage","icon":"database","pages":[{"title":"Storage","sidebarTitle":"Overview","href":"/architecture/storage/index"},{"title":"Cache Volumes","href":"/architecture/storage/cache-volumes"},{"title":"Container Registry","href":"/architecture/storage/container-registry"},{"title":"Artifact Storage","href":"/architecture/storage/artifact-storage"},{"title":"Secrets","href":"/architecture/storage/secrets"}]},{"group":"Networking","icon":"network","pages":[{"title":"Networking","sidebarTitle":"Overview","href":"/architecture/networking/index"},{"title":"Ingress","href":"/architecture/networking/ingress"},{"title":"Network Performance Optimizations","sidebarTitle":"Performance","href":"/architecture/networking/performance"},{"title":"Network Security","sidebarTitle":"Security","href":"/architecture/networking/security"},{"title":"Egress policies","href":"/security/egress-policy"}]}]},{"group":"Administration","pages":[{"group":"Workspaces","icon":"briefcase-business","pages":[{"title":"Workspaces","sidebarTitle":"Overview","href":"/workspaces/index"},{"title":"Workspace Access Controls","sidebarTitle":"Access","href":"/workspaces/access"},{"title":"Billing \u0026 Included Amounts","sidebarTitle":"Billing and limits","href":"/workspaces/billing-and-limits"},{"title":"Data Residency for Workspaces","sidebarTitle":"Data residency","href":"/workspaces/data-residency"},{"title":"Security \u0026 Compliance","sidebarTitle":"Security","href":"/workspaces/security"},{"title":"Audit Logs","sidebarTitle":"Audit logging","href":"/security/auditlog"},{"title":"Permissions","href":"/security/permissions"}]},{"group":"Federation","icon":"shield-check","pages":[{"title":"Workload Federation","sidebarTitle":"Overview","href":"/federation/index"},{"title":"Workload Federation with AWS","sidebarTitle":"AWS","href":"/federation/aws"},{"title":"Workload Federation with GCP","sidebarTitle":"GCP","href":"/federation/gcp"},{"title":"Workload Federation with OpenID Connect","sidebarTitle":"OpenID","href":"/federation/openid"},{"title":"Identity Federation with GitHub Actions","sidebarTitle":"Github Actions","href":"/federation/github-actions"},{"title":"Identity Federation with CircleCI","sidebarTitle":"CircleCI","href":"/federation/circleci"},{"title":"Identity Federation with RWX","sidebarTitle":"RWX","href":"/federation/rwx"}]},{"group":"Dashboard","icon":"layout-dashboard","pages":[{"title":"GitHub Actions Overview","sidebarTitle":"GitHub Actions","href":"/dashboard/github-actions"},{"title":"Builds UI","sidebarTitle":"Builds","href":"/dashboard/builds"},{"title":"Registry UI","sidebarTitle":"Registry","href":"/dashboard/registry"},{"title":"Usage Explorer","href":"/dashboard/usage-explorer"}]}]}]},{"tab":"Integrations","icon":"blocks","pages":[{"title":"Integrations","href":"/integrations/turborepo"}]},{"tab":"CLI","icon":"square-terminal","pages":[{"title":"CLI","href":"/reference/cli"}]},{"tab":"SDK","icon":"braces","pages":[{"title":"SDK","href":"/reference/sdk"}]},{"tab":"MCP","icon":"plug","pages":[{"title":"MCP","href":"/reference/mcp"}]}]},{"product":"Platform","description":"Lower-level primitives to build your own","pages":[{"title":"Platform","href":"/platform"}]}]},"title":"Bazel Remote Execution - Namespace Documentation","buildId":"dpl_GvhK4qVXq51DpfYJLCtPpYNN4YHN","deploymentId":"dpl_GvhK4qVXq51DpfYJLCtPpYNN4YHN","dynamics":[],"chunks":[]}