Skip to content

Commit 803f307

Browse files
committed
Update readthedocs configuration
Signed-off-by: Gigon Bae <gbae@nvidia.com>
1 parent b4cf87f commit 803f307

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
f"{READTHEDOCS_PROJECT}/envs/{READTHEDOCS_VERSION}/bin/activate; ../../run setup read_the_docs'",
2020
shell=True,
2121
)
22+
# Update LD_LIBRARY_PATH for CUDA runtime
23+
old_ld_library_path = os.environ.get("LD_LIBRARY_PATH", "")
24+
# Note that 'python3.8' is hard-coded here, it should be updated if the Python version changes by
25+
# .readthedocs.yml or other configurations.
26+
os.environ["LD_LIBRARY_PATH"] = (
27+
f"{READTHEDOCS_PROJECT}/envs/{READTHEDOCS_VERSION}/lib/python3.8/site-packages/nvidia/cuda_runtime/lib:{old_ld_library_path}"
28+
)
2229
subprocess.call(
2330
"/bin/bash -c 'source /home/docs/checkouts/readthedocs.org/user_builds/"
2431
f"{READTHEDOCS_PROJECT}/envs/{READTHEDOCS_VERSION}/bin/activate; ../../run setup_gen_docs'",

run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ install_python_dev_deps() {
306306
# Read the Docs site is using specific setuptools version so should not upgrade it.
307307
if [ "$config" = "read_the_docs" ]; then
308308
run_command ${MONAI_PY_EXE} -m pip install -q -U pip wheel build
309+
# Install cuda runtime dependency
310+
run_command ${MONAI_PY_EXE} -m pip install -q nvidia-cuda-runtime-cu12
309311
else
310312
run_command ${MONAI_PY_EXE} -m pip install -q -U setuptools pip wheel build
311313
fi

0 commit comments

Comments
 (0)