Updated build docs for Python API (#22134)

* Updated build docs for Python API

* Removed legacy variables

* Update docs/dev/build_windows.md

Co-authored-by: Sebastian Golebiewski <sebastianx.golebiewski@intel.com>

---------

Co-authored-by: Sebastian Golebiewski <sebastianx.golebiewski@intel.com>
This commit is contained in:
Ilya Lavrenov 2024-01-12 18:55:02 +04:00 committed by GitHub
parent ab8dc10b20
commit a301038694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 19 deletions

View File

@ -276,7 +276,6 @@ macro(ov_cpack_settings)
ov_rpm_add_rpmlint_suppression("${python_component}"
# all directories
"non-standard-dir-perm /usr/lib64/${pyversion}/site-packages/openvino/*"
"non-standard-dir-perm /usr/lib64/${pyversion}/site-packages/ngraph/*"
)
endif()

View File

@ -51,7 +51,7 @@ The software was validated on:
4. OpenVINO Runtime uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create Unix makefiles, then run `make` to build the project:
```sh
cmake -DCMAKE_BUILD_TYPE=Release ..
make --jobs=$(nproc --all)
cmake --build . --parallel
```
The process may take some time to finish.
@ -68,19 +68,15 @@ You can use the following additional build options:
- OpenVINO offers several CMake options that can be used to build a custom OpenVINO runtime, which can speed up compilation. These options allow you to skip compilation of other plugins and frontends by disabling/enabling them. You can find a list of available options [here](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/cmake_options_for_custom_compilation.md)
- To build the OpenVINO Runtime Python API:
1. Install all additional packages (e.g., cython and opencv) listed in the `/src/bindings/python/src/compatibility/openvino/requirements-dev.txt` file:
```sh
pip install -r requirements-dev.txt
```
2. Enable the `-DENABLE_PYTHON=ON` option in the CMake step above (Step 4). To specify an exact Python version, use the following options (requires cmake 3.16 and higher):
1. Enable the `-DENABLE_PYTHON=ON` option in the CMake step above (Step 4). To specify an exact Python version, use the following options (requires cmake 3.16 and higher):
```
-DPython3_EXECUTABLE=/usr/bin/python3.8
```
3. To build a wheel package (.whl), enable the `-DENABLE_WHEEL=ON` option in the CMake step above (Step 4), and install requirements:
2. To build a wheel package (.whl), enable the `-DENABLE_WHEEL=ON` option in the CMake step above (Step 4), and install requirements:
```sh
pip install -r <openvino source tree>/src/bindings/python/wheel/requirements-dev.txt
```
4. After the build process finishes, export the newly built Python libraries to the user environment variables:
3. After the build process finishes, export the newly built Python libraries to the user environment variables:
```
export PYTHONPATH=<openvino_repo>/bin/intel64/Release/python:$PYTHONPATH
export LD_LIBRARY_PATH=<openvino_repo>/bin/intel64/Release:$LD_LIBRARY_PATH

View File

@ -39,8 +39,7 @@ git clone --recurse-submodules --single-branch --branch=master https://github.co
## Additional Build Options
- To build Python API, install `libpython3-dev:armhf` and `python3-pip`
packages using `apt-get`; then install `numpy` and `cython` python modules
via `pip3`, adding the following options:
packages using `apt-get`; add the following options:
```sh
-DENABLE_PYTHON=ON \
-DPython3_EXECUTABLE=/usr/bin/python3.8

View File

@ -51,19 +51,15 @@ Supported configurations:
### Additional Build Options
- To build the OpenVINO Runtime Python API:
1. First, install all additional packages (e.g., cython) listed in the file:
```sh
pip install -r <path\to\openvino>\src\bindings\python\src\compatibility\openvino\requirements-dev.txt
```
2. Second, enable the `-DENABLE_PYTHON=ON` in the CMake (Step #3) option above. To specify an exact Python version, use the following options (requires cmake 3.16 and higher):
1. Enable the `-DENABLE_PYTHON=ON` in the CMake (Step #3) option above. To specify an exact Python version, use the following options (requires cmake 3.16 and higher):
```sh
-DPython3_EXECUTABLE="C:\Program Files\Python11\python.exe"
```
3. To build a wheel package (.whl), enable the `-DENABLE_WHEEL=ON` option in the CMake step above (Step 4), and install requirements:
2. To build a wheel package (.whl), enable the `-DENABLE_WHEEL=ON` option in the CMake step above (Step 4), and install requirements:
```sh
pip install -r <openvino source tree>\src\bindings\python\wheel\requirements-dev.txt
```
4. After the build process finishes, export the newly built Python libraries to the user environment variables:
3. After the build process finishes, export the newly built Python libraries to the user environment variables:
```
set PYTHONPATH=<openvino_repo>/bin/<arch>/Release/python;%PYTHONPATH%
set OPENVINO_LIB_PATHS=<openvino_repo>/bin/<arch>/Release;%OPENVINO_LIB_PATH%

View File

@ -281,7 +281,6 @@ macro(ov_define_setup_py_dependencies)
list(APPEND ov_setup_py_deps
${openvino_py_files}
${compat_ngraph_py_files}
"${CMAKE_CURRENT_SOURCE_DIR}/wheel/setup.py"
"${OpenVINOPython_SOURCE_DIR}/requirements.txt"
"${OpenVINOPython_SOURCE_DIR}/wheel/readme.txt"