From fa8d48236f99b369325a99a47429475c0c34205a Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Tue, 15 Oct 2024 22:36:48 +0000 Subject: [PATCH] address review comments --- cuda_python/docs/README.md | 13 +++++++++++++ cuda_python/docs/build_all_docs.sh | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cuda_python/docs/README.md b/cuda_python/docs/README.md index bfcc3199..4cf18ee7 100644 --- a/cuda_python/docs/README.md +++ b/cuda_python/docs/README.md @@ -6,5 +6,18 @@ Alternatively, we can build all the docs at once by running [`./build_all_docs.sh`](./build_all_docs.sh). +When building the docs, some (but not all) of the urls can be rendered/examined locally by setting the environment +variable `CUDA_PYTHON_DOMAIN` as follows: +```shell +CUDA_PYTHON_DOMAIN="http://localhost:1234/" ./build_all_docs.sh +python -m http.server -d build/html 1234 +``` +If the docs are built on a remote machine, you can set up the ssh tunnel in a separate terminal session +via +```shell +ssh -L 1234:localhost:1234 username@hostname +``` +Then browse the built docs by visiting `http://localhost:1234/` on a local machine. + To publish the docs with the built version, it is important to note that the html files of older versions should be kept intact, in order for the version selection (through `versions.json`) to work. diff --git a/cuda_python/docs/build_all_docs.sh b/cuda_python/docs/build_all_docs.sh index d5a0c20a..030463b7 100755 --- a/cuda_python/docs/build_all_docs.sh +++ b/cuda_python/docs/build_all_docs.sh @@ -13,7 +13,7 @@ pushd . cd ../../cuda_bindings/docs rm -rf build ./build_docs.sh -cp -r build/html/* "$(dirs +1)"/$CUDA_BINDINGS_PATH +cp -r build/html/* "$(dirs -l +1)"/$CUDA_BINDINGS_PATH popd # build cuda-core docs @@ -23,5 +23,5 @@ pushd . cd ../../cuda_core/docs rm -rf build ./build_docs.sh -cp -r build/html/* "$(dirs +1)"/$CUDA_CORE_PATH +cp -r build/html/* "$(dirs -l +1)"/$CUDA_CORE_PATH popd