Make local API-free documentation previews lightweight
Problem
The existing ./build_doc.sh --html --skip-api omits generated API pages, but still installs the full documentation runtime extra. That pulls in CPU PyTorch, XGBoost, and many NVFlare runtime dependencies even when a developer only needs a quick preview of narrative pages. The published Read the Docs build must continue to include the API reference.
Evidence
On an isolated Linux x86_64/Python 3.10 host limited to two CPU cores, the current full documentation environment occupies about 2.00 GiB. A direct API-free Sphinx build took 28.1 seconds. Installing only the six Sphinx documentation packages under the existing constraints took 5.2 seconds and produced a 112 MiB environment; it generated the same 256 HTML and 254 Markdown preview pages. The exact candidate branch's fresh end-to-end preview completed in 32.2 seconds. API-free output still contains an empty API landing page and unresolved API links, so it is a local preview only.
Proposed improvement and acceptance
- Make
--skip-apiinstall only the Sphinx documentation packages, using the existing production constraints on Linux x86_64/Python 3.10. - Keep the default full API build and
.readthedocs.yamlunchanged. - Document that preview navigation and Python cross-references are incomplete.
- Verify in fresh environments that preview installs no NVFlare, Torch, XGBoost, or CUDA packages; the full HTML and Markdown/API inventory is preserved; and existing GPU development dependencies are not changed by preview.
This is a follow-up to the now successful full documentation build in #5611.