Environment variables
pairbench’s own environment variables start with PAIRBENCH_, and a variable that other
software defines keeps the name that software gives it. This page lists every variable
pairbench reads or sets, what it does with it and which software defines it, then the variables
its showcases and its test suite read.
Each variable has its own heading, so a link can point at it, for example
environment.md#pairbench_config. A name written with a trailing *
stands for every variable whose name starts that way.
Your own variables
Section titled “Your own variables”The names you put in a launch.env table or a side’s env table are yours: pairbench sets
them in the launch as written, and the config written to the capture hides the value of a name
that looks like a credential (see config).
A variable named in launch.env_pass is also yours, for example a model hub token that a
server reads. pairbench hands it to the launch by name and never writes its value anywhere:
the capture and the results hold only the name. On an image or serving side the value travels
in the environment of the engine’s command (--env NAME), so it does not show on a command
line another user of the machine can list. A command or Python-environment side gets it in its
environment.
pairbench reads no secret of its own. The naming rule covers secrets as well: a token that
pairbench itself reads is named with the same prefix, such as PAIRBENCH_TOKEN.
pairbench’s own variables
Section titled “pairbench’s own variables”PAIRBENCH_CONFIG
Section titled “PAIRBENCH_CONFIG”Defined by pairbench.
The config file to load, as --config FILE does. No config file is loaded without one of the
two, because a config launches commands.
PAIRBENCH_OUT
Section titled “PAIRBENCH_OUT”Defined by pairbench.
The run folder, as run.out sets it. When PAIRBENCH__RUN__OUT is also set, both must name
the same folder, or the run stops with E_CONFIG (exit 2).
PAIRBENCH__*
Section titled “PAIRBENCH__*”Defined by pairbench.
PAIRBENCH__SECTION__KEY sets the config key section.key, with double underscores between
the parts of the path: PAIRBENCH__RUN__ROUNDS=24 sets run.rounds. The parts are
lower-cased, and the value is read as a TOML value when it parses as one and as text
otherwise. A variable that names no key stops the run with E_CONFIG (exit 2). The command
line wins over the environment, and the environment over the config file. See
config.
PAIRBENCH__LAUNCH__ENGINE
Section titled “PAIRBENCH__LAUNCH__ENGINE”Defined by pairbench.
Sets launch.engine, as every PAIRBENCH__ variable sets its key. When launch.engine is
auto and both Docker and Podman are found, the engine it names is the one used.
PAIRBENCH_WORK_FACTOR
Section titled “PAIRBENCH_WORK_FACTOR”Defined by pairbench.
Set to 2 in the positive control’s launch when controls.positive_via = "factor". The
workload reads it and does its work that many times; every showcase workload does. See
positive control.
PAIRBENCH_ENV_PAD
Section titled “PAIRBENCH_ENV_PAD”Defined by pairbench.
Set in every launch of a round when run.vary_env_size = true: a run of the letter x
whose length changes from round to round, so the size of the environment does not stay the
same for the whole run.
PAIRBENCH_*
Section titled “PAIRBENCH_*”Defined by pairbench.
Every name with this prefix belongs to pairbench. A command or Python-environment side does
not inherit these variables from the environment pairbench runs in; name one in
launch.env_pass to hand it on.
Variables pairbench reads
Section titled “Variables pairbench reads”Defined by automated pipelines (GitHub Actions, GitLab CI/CD).
A true value (anything but an empty value, 0, false, no or off) marks the run as one
made in an automated pipeline: the machine record says so, and the quiet-machine wait records
its check without waiting unless asked. See shared machines.
Defined by POSIX.
Where pairbench looks for docker, podman, conda, perf, nvidia-smi and the program of
a command or Python-environment side. A virtual-environment or conda side puts its
environment’s bin folder first.
DOCKER_HOST
Section titled “DOCKER_HOST”Defined by Docker.
When it points Docker’s command at anything but a local socket (unix://...), pairbench takes
the containers to run elsewhere, so it does not look for their processes on this machine and
does not hand back the files they wrote. It is also one of the
DOCKER_* names the engine’s command reads.
CONTAINER_HOST
Section titled “CONTAINER_HOST”Defined by Podman. The same for Podman: when it points Podman’s command at anything but a local socket, the containers are taken to run elsewhere.
container
Section titled “container”Defined by container managers (systemd container interface). A value that is not empty says that pairbench itself runs inside a container. The machine record says so, and the machine checks work as the table in shared machines shows for a run inside a container.
KUBERNETES_SERVICE_HOST
Section titled “KUBERNETES_SERVICE_HOST”Defined by Kubernetes.
A value that is not empty says that pairbench runs inside a Kubernetes pod, and so inside a
container, with the same effect as container.
CONDA_EXE
Section titled “CONDA_EXE”Defined by conda.
The conda program that looks up a conda side given by name. Without it, conda is looked
for on PATH.
Variables the container engine’s command reads
Section titled “Variables the container engine’s command reads”Docker’s and Podman’s own commands read the variables below. On an image or serving side,
pairbench keeps the caller’s value of each for the engine’s command: a side’s env entry of
one of these names is passed to the container on the engine’s command line
(--env NAME=VALUE) instead of through the command’s environment, and env_pass refuses such
a name with E_ENGINE_UNSUPPORTED (exit 3), since its value would then show on a command line.
A name matches in any case: http_proxy counts as HTTP_PROXY.
Defined by POSIX. Read by the engine’s own command.
TMPDIR
Section titled “TMPDIR”Defined by POSIX. Read by the engine’s own command.
Defined by login (util-linux). Read by the engine’s own command.
HTTP_PROXY
Section titled “HTTP_PROXY”Defined by Go (net/http). Read by the engine’s own command.
HTTPS_PROXY
Section titled “HTTPS_PROXY”Defined by Go (net/http). Read by the engine’s own command.
NO_PROXY
Section titled “NO_PROXY”Defined by Go (net/http). Read by the engine’s own command.
ALL_PROXY
Section titled “ALL_PROXY”Defined by curl. Read by the engine’s own command.
SSL_CERT_FILE
Section titled “SSL_CERT_FILE”Defined by Go (crypto/x509). Read by the engine’s own command.
SSL_CERT_DIR
Section titled “SSL_CERT_DIR”Defined by Go (crypto/x509). Read by the engine’s own command.
GODEBUG
Section titled “GODEBUG”Defined by Go (runtime). Read by the engine’s own command.
Defined by Go (runtime). Read by the engine’s own command.
GOMAXPROCS
Section titled “GOMAXPROCS”Defined by Go (runtime). Read by the engine’s own command.
GOMEMLIMIT
Section titled “GOMEMLIMIT”Defined by Go (runtime). Read by the engine’s own command.
GOTRACEBACK
Section titled “GOTRACEBACK”Defined by Go (runtime). Read by the engine’s own command.
DOCKER_*
Section titled “DOCKER_*”Defined by Docker. Read by the engine’s own command.
CONTAINER_*
Section titled “CONTAINER_*”Defined by Podman. Read by the engine’s own command.
CONTAINERS_*
Section titled “CONTAINERS_*”Defined by Podman. Read by the engine’s own command.
BUILDAH_*
Section titled “BUILDAH_*”Defined by Podman. Read by the engine’s own command.
REGISTRY_AUTH*
Section titled “REGISTRY_AUTH*”Defined by Podman. Read by the engine’s own command.
Defined by XDG Base Directory Specification. Read by the engine’s own command.
Defined by the dynamic linker (ld.so). Read by the engine’s own command.
DYLD_*
Section titled “DYLD_*”Defined by the dynamic linker of macOS (dyld). Read by the engine’s own command.
Variables pairbench sets in a launch
Section titled “Variables pairbench sets in a launch”CUDA_VISIBLE_DEVICES
Section titled “CUDA_VISIBLE_DEVICES”Defined by CUDA.
Set to the GPUs of launch.gpus in a command or Python-environment side’s launch, so the
launched program sees only those GPUs; gpus = "all" removes it, so every GPU is visible.
Setting it in an env table as well as gpus is refused with E_USAGE (exit 2).
CUDA_DEVICE_ORDER
Section titled “CUDA_DEVICE_ORDER”Defined by CUDA.
Set to PCI_BUS_ID beside CUDA_VISIBLE_DEVICES, so CUDA numbers the visible GPUs in the
order of their PCI bus ids.
PYTHONPERFSUPPORT
Section titled “PYTHONPERFSUPPORT”Defined by Python.
Set to 1 in the explain step’s sampled-stacks launch, so a Python 3.12 or newer interpreter
reports its function names to perf. See diagnostics.
VIRTUAL_ENV
Section titled “VIRTUAL_ENV”Defined by Python (venv). Set to the environment’s folder for a virtual-environment side; removed for a plain interpreter or a conda side.
CONDA_PREFIX
Section titled “CONDA_PREFIX”Defined by conda. Set to the environment’s folder for a conda side; removed for a plain interpreter or a virtual-environment side.
CONDA_DEFAULT_ENV
Section titled “CONDA_DEFAULT_ENV”Defined by conda. Set to the environment’s name for a conda side; removed for a plain interpreter or a virtual-environment side. The environment’s activation scripts are not run.
PYTHONHOME
Section titled “PYTHONHOME”Defined by Python.
Removed from every Python-environment side’s launch, so the interpreter uses its own
standard library. A side’s env table can set it again.
PYTHONPATH
Section titled “PYTHONPATH”Defined by Python.
Removed from every Python-environment side’s launch, so the interpreter sees its own packages.
A side’s env table can set it again.
Variables of the showcases and the test suite
Section titled “Variables of the showcases and the test suite”The pairbench command reads none of these. The run.sh scripts of the
showcases and the repository’s test suite do.
PAIRBENCH_SHOWCASE_ENGINE
Section titled “PAIRBENCH_SHOWCASE_ENGINE”Defined by pairbench.
The container engine command a showcase’s run.sh calls for its own preparation, such as an
install into a folder the sides mount. docker when unset.
PAIRBENCH_SHOWCASE_PUBLISH
Section titled “PAIRBENCH_SHOWCASE_PUBLISH”Defined by pairbench.
A folder inside the showcase, without ..: the showcase’s run.sh then makes a run whose
results may be published. It refuses unless the checkout is reached at /work, runs
pairbench run with HOME=/home/user into a new private folder under pairbench-runs/, and
publishes results.json, results.md and report.html into the named folder, and
hash_inputs.json with them only when the shared files show every value the sidecar holds;
otherwise the sidecar stays owner-only in the private folder and run.sh exits with the run’s
own code. A normal run when unset. Each of these values is refused with exit 2 and its own
line on standard error, before anything runs: an empty value; one that names the showcase
folder itself, such as . or ./.; an absolute path or one with ..; one with a part made
only of blanks or only of dots, or a part that starts with -; and pairbench-runs or a
folder under it, which holds the private run folders. A value that reaches, through a link, the
showcase folder, a folder that holds it, or pairbench-runs or a folder under it is refused the
same way, as is one with a part that is a link leading to no folder.
PAIRBENCH_NEIGHBOUR_LOOPS
Section titled “PAIRBENCH_NEIGHBOUR_LOOPS”Defined by pairbench.
How many busy loops the neighbour container of the noisy neighbour showcase runs. 1 when
unset.
PAIRBENCH_TEST_GPU
Section titled “PAIRBENCH_TEST_GPU”Defined by pairbench.
Set to 1 to let the test suite run its GPU tests. Without it they skip, so a machine that
has a GPU does not start GPU work by running the tests.
PAIRBENCH_REQUIRE_ENGINE
Section titled “PAIRBENCH_REQUIRE_ENGINE”Defined by pairbench.
Set to docker or podman to turn a test’s skip for want of that container engine into a
failure.
PAIRBENCH_REQUIRE_PLOT
Section titled “PAIRBENCH_REQUIRE_PLOT”Defined by pairbench.
Set to 1 to turn a test’s skip for want of the plot extra into a failure.
PAIRBENCH_REQUIRE_DELIVERY
Section titled “PAIRBENCH_REQUIRE_DELIVERY”Defined by pairbench.
Set to 1 to turn the skip of the tests that build and install the wheel, when they cannot,
into a failure.
Where the definitions come from
Section titled “Where the definitions come from”Each “Defined by” above names the software whose own documentation or source defines the variable:
CI: GitHub Actions, variables reference (“Always set totrue”); GitLab, predefined CI/CD variables, read for GitLab 19.3.HOME,PATH,TMPDIR: POSIX.1-2024, Environment Variables.USER: login(1) of util-linux 2.43, which sets it from the password entry.container: systemd, Container Interface at v257: the container manager sets it for the container’s first process.KUBERNETES_SERVICE_HOST: Kubernetes, Accessing the Kubernetes API from a Pod, read for v1.37.DOCKER_*,DOCKER_HOST: thedockercommand reference, read for Docker 29.8, which listsDOCKER_HOSTand the otherDOCKER_variables and says the command also readsHTTP_PROXY,HTTPS_PROXYandNO_PROXY.CONTAINER_*,CONTAINERS_*,CONTAINER_HOST: podman(1) of Podman 5.4.0, which also listsTMPDIRand threeXDG_variables.BUILDAH_*: podman-build(1) of Podman 5.4.0.REGISTRY_AUTH*: podman-login(1) of Podman 5.4.0 (REGISTRY_AUTH_FILE).HTTP_PROXY,HTTPS_PROXY,NO_PROXY: Go,net/http.ProxyFromEnvironmentat go1.25.0.ALL_PROXY: the curl manual of curl 8.23.1.SSL_CERT_FILE,SSL_CERT_DIR: Go,crypto/x509at go1.25.0.GODEBUG,GOGC,GOMAXPROCS,GOMEMLIMIT,GOTRACEBACK: Go,runtimeat go1.25.0.XDG_*: the XDG Base Directory Specification, version 0.8.LD_*: ld.so(8) of man-pages 6.19.DYLD_*: dyld(1) at dyld-1378.VIRTUAL_ENV: Python,venv, 3.13.PYTHONHOME,PYTHONPATH,PYTHONPERFSUPPORT: Python, command line and environment, 3.13 (PYTHONPERFSUPPORTfrom 3.12 on).CONDA_PREFIX,CONDA_DEFAULT_ENV,CONDA_EXE: conda 25.9.1,conda/activate.pyandconda/base/context.py.CUDA_VISIBLE_DEVICES,CUDA_DEVICE_ORDER: the CUDA Programming Guide, v13.5.
pairbench is made by Eugo