-
Notifications
You must be signed in to change notification settings - Fork 31
/
conf.py
151 lines (128 loc) · 5.3 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import datetime
import os
import sys
# -- Project information -----------------------------------------------------
project = "RAPIDS Deployment Documentation"
copyright = f"{datetime.date.today().year}, NVIDIA"
author = "NVIDIA"
# Single modifiable version for all of the docs - easier for future updates
stable_version = "24.04"
nightly_version = "24.06"
versions = {
"stable": {
"rapids_version": stable_version,
"rapids_container": f"nvcr.io/nvidia/rapidsai/base:{stable_version}-cuda11.8-py3.10",
"rapids_notebooks_container": f"nvcr.io/nvidia/rapidsai/notebooks:{stable_version}-cuda11.8-py3.10",
"rapids_conda_channels": "-c rapidsai -c conda-forge -c nvidia",
"rapids_conda_packages": f"rapids={stable_version} python=3.10 cuda-version=11.8",
},
"nightly": {
"rapids_version": f"{nightly_version}-nightly",
"rapids_container": f"rapidsai/base:{nightly_version + 'a'}-cuda11.8-py3.10",
"rapids_notebooks_container": f"rapidsai/notebooks:{nightly_version + 'a'}-cuda11.8-py3.10",
"rapids_conda_channels": "-c rapidsai-nightly -c conda-forge -c nvidia",
"rapids_conda_packages": f"rapids={nightly_version} python=3.10 cuda-version=11.8",
},
}
rapids_version = (
versions["stable"]
if os.environ.get("DEPLOYMENT_DOCS_BUILD_STABLE", "false") == "true"
else versions["nightly"]
)
rapids_version["rapids_conda_channels_list"] = [
channel
for channel in rapids_version["rapids_conda_channels"].split(" ")
if channel != "-c"
]
rapids_version["rapids_conda_packages_list"] = rapids_version[
"rapids_conda_packages"
].split(" ")
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
sys.path.insert(0, os.path.abspath("../extensions"))
extensions = [
"IPython.sphinxext.ipython_console_highlighting",
"sphinx.ext.intersphinx",
"myst_nb",
"sphinxcontrib.mermaid",
"sphinx_design",
"sphinx_copybutton",
"rapids_notebook_files",
"rapids_related_examples",
"rapids_grid_toctree",
"rapids_version_templating",
"rapids_admonitions",
]
myst_enable_extensions = ["colon_fence", "dollarmath"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
copybutton_prompt_is_regexp = True
suppress_warnings = ["myst.header", "myst.nested_header"]
# -- Options for notebooks -------------------------------------------------
nb_execution_mode = "off"
rapids_deployment_notebooks_base_url = (
"https://github.com/rapidsai/deployment/blob/main/source/"
)
# -- Options for HTML output -------------------------------------------------
html_theme_options = {
"header_links_before_dropdown": 7,
# https://github.com/pydata/pydata-sphinx-theme/issues/1220
"icon_links": [],
"logo": {
"link": "https://docs.rapids.ai/",
},
"github_url": "https://github.com/rapidsai/",
"show_toc_level": 1,
"navbar_align": "right",
"secondary_sidebar_items": [
"page-toc",
"notebooks-extra-files-nav",
"notebooks-tags",
],
}
html_sidebars = {
"**": ["sidebar-nav-bs", "sidebar-ethical-ads"],
"index": [],
"examples/index": ["notebooks-tag-filter", "sidebar-ethical-ads"],
}
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "pydata_sphinx_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_logo = "_static/RAPIDS-logo-purple.png"
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"dask": ("https://docs.dask.org/en/latest/", None),
"distributed": ("https://distributed.dask.org/en/latest/", None),
"dask_kubernetes": ("https://kubernetes.dask.org/en/latest/", None),
"dask_cuda": ("https://docs.rapids.ai/api/dask-cuda/stable/", None),
}
def setup(app):
app.add_css_file("https://docs.rapids.ai/assets/css/custom.css")
app.add_css_file("css/custom.css")
app.add_js_file(
"https://docs.rapids.ai/assets/js/custom.js", loading_method="defer"
)
app.add_js_file("js/nav.js", loading_method="defer")
app.add_js_file("js/notebook-gallery.js", loading_method="defer")