Back to jax

JAXCI Environment Variables

ci/envs/README.md

0.3.2512.9 KB
Original Source

JAXCI Environment Variables

This docpage describes the various JAXCI environment variables that are used in the CI scripts and their behaviors. These variables are used to control the behavior of the CI scripts such as the Python version used, path to JAX/XLA repo, if to clone XLA repo, etc.

NameDefault ValueBehaviorUsage
JAXCI_JAX_GIT_DIRPresent working directory: $(pwd)Path to the JAX's Git directory.Usage
JAXCI_HERMETIC_PYTHON_VERSIONSystem defaultControls the version of hermetic Python to use. This affects the Bazel commands only such as when building artifacts or when running the Bazel test scripts.Usage
JAXCI_CUDA_VERSION12Controls the CUDA version to use when building the JAX artifacts or running the tests.Usage
JAXCI_ROCM_VERSION7Controls the ROCm version to use when building the JAX artifacts or running the tests.Usage
JAXCI_XLA_GIT_DIRUnsetWhen using a local copy of XLA, this points to the root of the XLA git repository.Usage
JAXCI_CLONE_MAIN_XLA0If set to 1, the XLA repository is cloned at HEAD and its path is set in JAXCI_XLA_GIT_DIRUsage
JAXCI_XLA_COMMITUnsetAllows overriding the XLA commit that is used when using a local copy of XLA.Usage
JAXCI_OUTPUT_DIR$(pwd)/distControls the location where the artifacts are written to. The directory will be automatically created if it does not exist.Usage
JAXCI_BUILD_ARTIFACT_WITH_RBE0When set to 1, Bazel will use RBE to build the artifacts. Requires gcloud authentication and only certain platforms support RBE so this typically only set in CI buildsUsage
JAXCI_WRITE_TO_BAZEL_REMOTE_CACHE0When set to 1, Bazel will also try to push new cache entries to the cache bucket. Since writes to the bucket require authentication, this flag is enabled only for CI builds. Note that the builds using RBE use the RBE cache and not Bazel's remote cache, therefore this variable is a no-op if JAXCI_BUILD_ARTIFACT_WITH_RBE is set to 1. When JAXCI_BUILD_ARTIFACT_WITH_RBE and JAXCI_WRITE_TO_BAZEL_REMOTE_CACHE are both not set, Bazel will still read from the public cache bucket to try to speed up the build.Usage
JAXCI_ARTIFACT_TYPE"default"Controls the type of artifacts to build. Valid values are "default", "release", "nightly". This affects the wheel tag and metadata, see ci/build_artifacts.sh to understand how.Usage
JAXCI_WHEEL_RC_VERSIONUnsetDuring the release process, we build a Release Candidate (RC) wheel in addition to the release wheel. This environment variable sets the version of the RC wheel to build. Values are set internally.Usage
JAXCI_PYTHONpython${JAXCI_HERMETIC_PYTHON_VERSION}Points to the system Python binary to use. It used by scripts that make use of the system Python such as the Pytest scripts.Usage
JAXCI_ENABLE_X640By default, JAX enforces single-precision numbers to mitigate the Numpy API’s tendency to aggressively promote operands to double. When set to 1, the tests will use double-precision numbers.Usage
JAXCI_TPU_CORESUnsetSets the number of TPU cores for the TPU machine type. Values are set in the workflow files.Usage
JAXCI_RUN_FULL_TPU_TEST_SUITE0When set to 1, the full TPU test suite is run. Otherwise, a subset of tests is run.Usage
JAXCI_JAX_PYPI_EXTRASUnsetUsed to control the installation of JAX extras from PyPI. See JAX's setup.py for the list of valid values.Usage
JAXCI_BUILD_JAXLIBtrueUsed to control the value of build_jaxlib flag.Usage
JAXCI_BUILD_JAXtrueUsed to control the value of build_jax flag.Usage
JAXCI_BAZEL_OUTPUT_BASEUnsetUsed to control the output base for Bazel builds.Usage
JAXCI_BAZEL_CPU_RBE_MODEtestUsed to control whether to run or build the CPU test targets.Usage

Docker Specific Environment Variables

[!NOTE] The following environment variables only affect the build if the run_docker_container.sh script was invoked to start a Docker container and the build is running inside that container. Typically, this would be the internal CI builds and local builds. Note that while GitHub actions use the same Docker images, they do not invoke "run_docker_container.sh" as they leverage built-in containerization features to run jobs within a container.

NameDefault ValueBehaviorUsage
JAXCI_DOCKER_WORK_DIR"/jax"The path on the container where the JAX Git repository is mounted to.Usage
JAXCI_DOCKER_ARGSEmpty StringSpace separated string of additional arguments that will be passed when starting the Docker containerUsage
JAXCI_DOCKER_IMAGEDepends on the system (see ci/envs/docker.env)Docker image to pullUsage