nemo_gym.agent_utils.uv_bootstrap
nemo_gym.agent_utils.uv_bootstrap
The uv binary a harness uploads into a task sandbox, chosen for the sandbox’s platform.
An agent host and its task sandboxes need not share a CPU architecture or a C library: an aarch64
login node drives x86_64 pods, and an Alpine image runs musl. A harness that installs a Python
runtime inside the sandbox with uv therefore asks the sandbox what it is and picks a build that
runs there. The static musl build of uv runs on glibc and musl alike, so it is the one
downloaded; the host’s own binary is reused only when it is known to run in the sandbox.
uv_for_sandbox is the entry point; everything else here is implementation detail. Shared by the
harnesses that install a Python runtime in the sandbox (Hermes today). Harnesses on
Node, such as Codex and Pi, do not acquire a uv dependency through this module.
Module Contents
Classes
Functions
Data
API
What uname -s, uname -m and the C library probe reported inside the sandbox.
Fetch the uv release for target into destination (atomic, idempotent).
Whether the host’s own uv runs in the sandbox: a Linux host, the same architecture, and a glibc
sandbox (the host binary is a gnu build; the musl download covers musl sandboxes).
uv --version -> 0.12.3.
Ask the sandbox for its kernel, machine and C library.
The uv release target to download for a sandbox: the static musl build for its architecture.
The uv binary to upload into sandbox.
The host’s binary when it is known to run there, else the static musl build of the host’s uv
version for the sandbox’s architecture, fetched once into cache_dir.