From f7480b24fbc3b40d51cb83758cca5ab7f2cb0729 Mon Sep 17 00:00:00 2001 From: Sameer Sheorey Date: Tue, 31 Oct 2023 16:12:29 -0700 Subject: [PATCH] Prevent overwriting pinned JInja2 version during `make install-pip-package` Update build docs instructions --- docs/builddocs.rst | 47 ++++++++++++++++++++++++++++++++-------------- util/ci_utils.sh | 9 +++++---- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/docs/builddocs.rst b/docs/builddocs.rst index 5e0d39f8b77f..2f8e9539957b 100644 --- a/docs/builddocs.rst +++ b/docs/builddocs.rst @@ -9,16 +9,14 @@ generated by `sphinx `_. The C++ API documentation is generated by `Doxygen `_. Documentation can be built on Ubuntu or macOS. Building documentation on Windows -may also be possible but it is not officially tested. +may also be possible but is not officially tested. If you're building documentation on a computer without a display, please use :ref:`headless_rendering`, otherwise the Jupyter tutorials will fail to execute. -Prerequisites -------------- -1. Install system dependencies -`````````````````````````````` +Install system dependencies +--------------------------- **Ubuntu** @@ -34,23 +32,44 @@ First, install a TeX distribution such as `MacTeX `_ brew install ghostscript pandoc doxygen -2. Install Python dependencies -`````````````````````````````` + +Building C++ documentation +-------------------------- + +If you only want to build C++ API documentation, clone the Open3D repo and run +doxygen. .. code-block:: bash - pip install -r docs/requirements.txt + git clone https://github.com/isl-org/open3d + cd open3d/docs + doxygen Doxyfile.in + +Start browsing the generated C++ API documentation from the file +``docs/doxygen/html/index.html``. Read on if you want to build the full +documentation (including Python API and tutorials). -Build ------ -First, clone and build Open3D from source and install the Open3D Python package. -Visit :ref:`compilation` for details. After configuration, install the Open3D -Python package with: +Install or Build Open3D +----------------------- .. code-block:: bash - make install-pip-package -j$(nproc) + pip install open3d + +To instead build Open3D from source, see :ref:`compilation`. + + +Install Python dependencies +--------------------------- + +.. code-block:: bash + + pip install -r docs/requirements.txt + +Build docs +---------- + .. code-block:: bash diff --git a/util/ci_utils.sh b/util/ci_utils.sh index 3d9416d1f467..f34eb4c6835b 100644 --- a/util/ci_utils.sh +++ b/util/ci_utils.sh @@ -70,9 +70,9 @@ install_python_dependencies() { if [ "$BUILD_TENSORFLOW_OPS" == "ON" ]; then # TF happily installs both CPU and GPU versions at the same time, so remove the other python -m pip uninstall --yes "$TF_ARCH_DISABLE_NAME" - python -m pip install -U "$TF_ARCH_NAME"=="$TENSORFLOW_VER" # ML/requirements-tensorflow.txt + python -m pip install -U "$TF_ARCH_NAME"=="$TENSORFLOW_VER" # ML/requirements-tensorflow.txt fi - if [ "$BUILD_PYTORCH_OPS" == "ON" ]; then # ML/requirements-torch.txt + if [ "$BUILD_PYTORCH_OPS" == "ON" ]; then # ML/requirements-torch.txt if [[ "$OSTYPE" == "linux-gnu"* ]]; then python -m pip install -U "${TORCH_GLNX}" -f "$TORCH_REPO_URL" tensorboard @@ -414,9 +414,10 @@ build_docs() { -DBUILD_WEBRTC=OFF \ -DBUILD_JUPYTER_EXTENSION=OFF \ .. - make install-pip-package -j$NPROC + make python-package -j$NPROC make -j$NPROC bin/GLInfo + export PYTHONPATH="$PYTHONPATH:$PWD/lib/python_package" python -c "from open3d import *; import open3d; print(open3d)" cd ../docs # To Open3D/docs python make_docs.py $DOC_ARGS --clean_notebooks --execute_notebooks=always --py_api_rst=never @@ -434,7 +435,7 @@ build_docs() { -DBUILD_WEBRTC=ON \ -DBUILD_JUPYTER_EXTENSION=OFF \ .. - make install-pip-package -j$NPROC + make python-package -j$NPROC make -j$NPROC bin/GLInfo || echo "Expect failure since HEADLESS_RENDERING=OFF" python -c "from open3d import *; import open3d; print(open3d)"