Skip to content

Commit

Permalink
Update readthedocs configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gigony committed Apr 12, 2024
1 parent d19679d commit bc53284
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
f"{READTHEDOCS_PROJECT}/envs/{READTHEDOCS_VERSION}/bin/activate; ../../run setup read_the_docs'",
shell=True,
)
# Update LD_LIBRARY_PATH for CUDA runtime
old_ld_library_path = os.environ.get("LD_LIBRARY_PATH", "")
# Note that 'python3.8' is hard-coded here, it should be updated if the Python version changes by
# .readthedocs.yml or other configurations.
os.environ["LD_LIBRARY_PATH"] = (
f"{READTHEDOCS_PROJECT}/envs/{READTHEDOCS_VERSION}/lib/python3.8/site-packages/nvidia/cuda_runtime/lib:{old_ld_library_path}"
)
subprocess.call(
"/bin/bash -c 'source /home/docs/checkouts/readthedocs.org/user_builds/"
f"{READTHEDOCS_PROJECT}/envs/{READTHEDOCS_VERSION}/bin/activate; ../../run setup_gen_docs'",
Expand Down
2 changes: 2 additions & 0 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ install_python_dev_deps() {
# Read the Docs site is using specific setuptools version so should not upgrade it.
if [ "$config" = "read_the_docs" ]; then
run_command ${MONAI_PY_EXE} -m pip install -q -U pip wheel build
# Install cuda runtime dependency
run_command ${MONAI_PY_EXE} -m pip install -q nvidia-cuda-runtime-cu12
else
run_command ${MONAI_PY_EXE} -m pip install -q -U setuptools pip wheel build
fi
Expand Down

0 comments on commit bc53284

Please sign in to comment.