Implementation:Triton inference server Server SphinxDocConf
| Knowledge Sources | |
|---|---|
| Domains | Documentation, Build_System |
| Last Updated | 2026-02-13 17:00 GMT |
Overview
Concrete tool for configuring the Sphinx documentation build system for Triton Inference Server with NVIDIA theming, Markdown support, and cross-repository link rewriting.
Description
conf.py configures the Sphinx documentation builder for the Triton Inference Server documentation site. It integrates the NVIDIA Sphinx theme, enables myst-parser for Markdown file support, configures autosummary for API documentation generation, and implements custom link/URL replacement logic via the ultimateReplace() function for dynamic content substitution across documentation builds.
Usage
Used by the Sphinx build system (via sphinx-build or make docs) to generate the Triton documentation website. Developers modify this file to update documentation settings, theming, or link rewriting rules.
Code Reference
Source Location
- Repository: Triton Inference Server
- File: docs/conf.py
- Lines: 1-393
Signature
# Sphinx configuration variables
project = "Triton Inference Server"
extensions = [
"myst_parser",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
# ... additional extensions
]
def ultimateReplace(app, docname, source):
"""Custom source-read hook for URL/text replacement."""
result = source[0]
for key in defined_variables:
result = result.replace(key, defined_variables[key])
source[0] = result
Import
# Not imported directly; executed by Sphinx build system
# sphinx-build -b html docs/ docs/_build/html
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| RST/Markdown files | files | Yes | Documentation source files in docs/ directory |
| defined_variables | dict | No | Text replacement variables for dynamic content |
Outputs
| Name | Type | Description |
|---|---|---|
| HTML site | files | Rendered documentation website in _build/html |
| file | Optional PDF output via LaTeX builder |
Usage Examples
Building Documentation
cd docs/
pip install -r requirements.txt
sphinx-build -b html . _build/html
# Or using generate_docs.py for multi-repo builds
python generate_docs.py --build