conf.py 6.58 KB
Newer Older
1
2
3
4
5
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Configuration file for the Sphinx documentation builder.
import os
6
import sys
7
8

# -- Project information -----------------------------------------------------
9
10
project = "NVIDIA Dynamo"
copyright = "2024-2025, NVIDIA CORPORATION & AFFILIATES"
11
author = "NVIDIA"
12
13
14
15

# Version is set via DYNAMO_DOCS_VERSION env var during build (e.g., "0.3.0")
# Defaults to "dev" for main branch and PR builds
release = os.environ.get("DYNAMO_DOCS_VERSION", "dev")
16
17
18

# -- General configuration ---------------------------------------------------

19
# Standard extensions
20
21
22
23
24
extensions = [
    "ablog",
    "myst_parser",
    "sphinx_copybutton",
    "sphinx_design",
25
    "sphinx_prompt",
26
27
28
29
30
31
32
33
34
35
    # "sphinxcontrib.bibtex",
    "sphinx_tabs.tabs",
    "sphinx_sitemap",
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.mathjax",
    "sphinx.ext.napoleon",
    "sphinx.ext.ifconfig",
    "sphinx.ext.extlinks",
    "sphinxcontrib.mermaid",
36
    "sphinx_reredirects",
37
38
]

39
40
# Redirects configuration
redirects = {
41
    # PR  #3802
42
43
44
45
46
47
48
49
50
51
52
53
54
    "guides/tool-calling": "../agents/tool-calling.html",  # key format corrected
    "architecture/architecture": "../design_docs/architecture.html",
    "architecture/disagg_serving": "../design_docs/disagg_serving.html",
    "architecture/distributed_runtime": "../design_docs/distributed_runtime.html",
    "architecture/dynamo_flow": "../design_docs/dynamo_flow.html",
    "architecture/request_cancellation": "../fault_tolerance/request_cancellation.html",
    "architecture/request_migration": "../fault_tolerance/request_migration.html",
    "kubernetes/create_deployment": "../kubernetes/deployment/create_deployment.html",
    "kubernetes/minikube": "../kubernetes/deployment/minikube.html",
    "kubernetes/multinode-deployment": "../kubernetes/deployment/multinode-deployment.html",
    "kubernetes/logging": "../kubernetes/observability/logging.html",
    "kubernetes/metrics": "../kubernetes/observability/metrics.html",
    "architecture/kv_cache_routing": "../router/kv_cache_routing.html",
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
    # PR #3658
    "API/nixl_connect/README": "../../api/nixl_connect/README.html",
    "API/nixl_connect/connector": "../../api/nixl_connect/connector.html",
    "API/nixl_connect/descriptor": "../../api/nixl_connect/descriptor.html",
    "API/nixl_connect/device": "../../api/nixl_connect/device.html",
    "API/nixl_connect/device_kind": "../../api/nixl_connect/device_kind.html",
    "API/nixl_connect/operation_status": "../../api/nixl_connect/operation_status.html",
    "API/nixl_connect/rdma_metadata": "../../api/nixl_connect/rdma_metadata.html",
    "API/nixl_connect/read_operation": "../../api/nixl_connect/read_operation.html",
    "API/nixl_connect/readable_operation": "../../api/nixl_connect/readable_operation.html",
    "API/nixl_connect/writable_operation": "../../api/nixl_connect/writable_operation.html",
    "API/nixl_connect/write_operation": "../../api/nixl_connect/write_operation.html",
    "guides/backend": "../development/backend-guide.html",
    "runtime/README": "../development/runtime-guide.html",
    "guides/tool_calling": "../agents/tool-calling.html",
    "architecture/kvbm_architecture": "../kvbm/kvbm_architecture.html",
    "architecture/kvbm_components": "../kvbm/kvbm_components.html",
    "architecture/kvbm_intro": "../kvbm/kvbm_intro.html",
    "architecture/kvbm_motivation": "../kvbm/kvbm_motivation.html",
    "architecture/kvbm_reading": "../kvbm/kvbm_reading.html",
    "guides/run_kvbm_in_trtllm": "../kvbm/trtllm-setup.html",
    "guides/run_kvbm_in_vllm": "../kvbm/vllm-setup.html",
    "guides/health_check": "../observability/health-checks.html",
    "guides/logging": "../observability/logging.html",
    "guides/metrics": "../observability/metrics.html",
    "guides/disagg_perf_tuning": "../performance/tuning.html",
    "architecture/load_planner": "../planner/load_planner.html",
    "architecture/planner_intro": "../planner/planner_intro.html",
    "architecture/sla_planner": "../planner/sla_planner.html",
    "kubernetes/sla_planner_quickstart": "../planner/sla_planner_quickstart.html",
    "guides/dynamo_run": "../reference/cli.html",
    "dynamo_glossary": "../reference/glossary.html",
    "support_matrix": "../reference/support-matrix.html",
    "components/router/README": "../router/README.html",
89
90
}

91
92
93
# Custom extensions
sys.path.insert(0, os.path.abspath("_extensions"))
extensions.append("github_alerts")
94

95
96
# Handle Mermaid diagrams as code blocks (not directives) to avoid warnings
myst_fence_as_directive = ["mermaid"]  # Uncomment if sphinxcontrib-mermaid is installed
97

98
99
# File extensions (myst_parser automatically handles .md files)
source_suffix = [".rst", ".md"]
100

101
# MyST parser configuration
102
myst_enable_extensions = [
103
104
105
106
    "colon_fence",  # ::: code blocks
    "deflist",  # Definition lists
    "html_image",  # HTML images
    "tasklist",  # Task lists
107
108
]

109
110
# Templates path
templates_path = ["_templates"]
111

112
113
# List of patterns to ignore when looking for source files
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "build"]
114
115
116
117

# -- Options for HTML output -------------------------------------------------
html_theme = "nvidia_sphinx_theme"
html_static_path = ["_static"]
118
html_extra_path = ["project.json"]
119
120
html_theme_options = {
    "collapse_navigation": False,
121
122
123
124
125
126
127
128
    "icon_links": [
        {
            "name": "GitHub",
            "url": "https://github.com/ai-dynamo/dynamo",
            "icon": "fa-brands fa-github",
        }
    ],
    "switcher": {
129
130
131
        # Use single shared URL so all versions see the same switcher list
        # When a new version is added, all old docs automatically see it
        "json_url": "https://docs.nvidia.com/dynamo/versions1.json",
132
133
134
135
136
137
138
139
140
141
142
143
        "version_match": release,
    },
    "extra_head": {
        """
    <script src="https://assets.adobedtm.com/5d4962a43b79/c1061d2c5e7b/launch-191c2462b890.min.js" ></script>
    """
    },
    "extra_footer": {
        """
    <script type="text/javascript">if (typeof _satellite !== "undefined") {_satellite.pageBottom();}</script>
    """
    },
144
    "navbar_start": ["navbar-logo"],
145
146
147
    "primary_sidebar_end": [],
}

148
149
150
151
152
# Document settings
master_doc = "index"
html_title = f"{project} Documentation"
html_short_title = project
html_baseurl = "https://docs.nvidia.com/dynamo/latest/"
153

154
155
156
157
# Suppress warnings for external links and missing references
suppress_warnings = [
    "myst.xref_missing",  # Missing cross-references of relative links outside docs folder
]
158

159
160
161
# Additional MyST configuration
myst_heading_anchors = 7  # Generate anchors for headers
myst_substitutions = {}  # Custom substitutions