[DOCS] update documentation build instruction (#21427)

This commit is contained in:
jmacekx 2023-12-04 08:39:47 +01:00 committed by GitHub
parent 35330d5320
commit c759f8df86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,37 +1,44 @@
# Build Documentation Using CMake
# Building documentation with CMake
1. Clone submodules:
```
cd openvino
git submodule update --init --recursive
```
2. Install build dependencies using the `install_build_dependencies.sh` script in the project root folder.
```
chmod +x install_build_dependencies.sh
./install_build_dependencies.sh
```
3. Install [doxyrest](https://github.com/vovkos/doxyrest/releases/tag/doxyrest-2.1.2) and put the `bin` folder in your path
4. Install python dependencies:
**NOTE**: Instructions were tested inside container based on Ubuntu 22.04 docker image.
1. Clone the OpenVINO repository and setup its submodules
```
python -m pip install -r docs/requirements.txt
$ git clone <openvino_repository_url> <repository_path>
$ cd <repository_path>
$ git submodule update --init --recursive
```
2. Install build dependencies using the `install_build_dependencies.sh` script located in OpenVINO root directory
```
$ chmod +x install_build_dependencies.sh
$ ./install_build_dependencies.sh
```
3. Install additional packages needed to build documentation
```
$ apt install -y doxygen graphviz texlive
```
4. Create python virtualenv and install needed libraries
```
$ python3 -m venv env
$ source env/bin/activate
(env) $ pip install -r docs/requirements.txt
```
5. Install the sphinx theme
6. Create a build folder:
```
mkdir build && cd build
(env) $ cd docs/openvino_sphinx_theme && python setup.py install && cd -
``````
6. Create build folder:
```
(env) $ mkdir build && cd build
```
7. Build documentation using these commands:
```
cmake .. -DENABLE_DOCS=ON -DENABLE_DOCKER=ON
```
```
cmake --build . --target sphinx_docs
(env) $ cmake .. -DENABLE_DOCS=ON
(env) $ cmake --build . --target sphinx_docs
```
Depending on the needs, following variables can be added to first cmake call:
- building C/C++ API: `-DENABLE_CPP_API=ON`
- building Python API: `-DENABLE_PYTHON_API=ON`
- building Notebooks: `-DENABLE_NOTEBOOKS=ON`
- building OMZ: `-DENABLE_OMZ=ON`
- building OVMS: `-DENABLE_OVMS=ON -DOVMS_DOCS_DIR=<path_to_OVMS_repo>`