From 9a59475015102608dc8655c967e817a66581e8ef Mon Sep 17 00:00:00 2001 From: mjZhaoElaine <38148457+mjZhaoElaine@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:52:01 -0700 Subject: [PATCH] [CI/Build] Fix ReadTheDocs build under RTD's seeded pip 23.1 (#6129) Signed-off-by: Mengjie Zhao Co-authored-by: Claude Opus 5 --- .readthedocs.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 2b5b81bbc..be2996355 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,10 +11,15 @@ build: post_checkout: - git fetch --unshallow || true pre_install: + # `pre_install` runs before RTD upgrades pip, and the seeded pip 23.1 + # rejects the `typing_extensions` wheel torch needs (fixed in pip 23.2). + - python -m pip install --upgrade pip # Pre-install CPU torch so the subsequent `pip install .[docs]` does not # pull ~2 GB of CUDA 13 libs (cuBLAS/cuDNN/NCCL/...) that exceed RTD's - # 1 GB memory cap and time out the mkdocs build. - - python -m pip install --index-url https://download.pytorch.org/whl/cpu torch + # 1 GB memory cap and time out the mkdocs build. Wheel-only: `--index-url` + # replaces PyPI, so an sdist fallback cannot reach its build deps. The + # quotes keep YAML from reading `:all:` as a mapping key. + - "python -m pip install --only-binary=:all: --index-url https://download.pytorch.org/whl/cpu torch" mkdocs: configuration: mkdocs.yml