Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[Py OV] [DOCS] Remove use of openvino-nightly PyPI module (#30918)

Alicja Miloszewska176f097c51f4
diff --git a/docs/documentation_build_instructions.md b/docs/documentation_build_instructions.md
index a1412cfc3f3..28ddc52b454 100644
--- a/docs/documentation_build_instructions.md
+++ b/docs/documentation_build_instructions.md
@@ -44,5 +44,9 @@ $ source env/bin/activate
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 GenAI API: `-DENABLE_GENAI_API=ON`
- building Notebooks: `-DENABLE_NOTEBOOKS=ON`
- building OVMS: `-DENABLE_OVMS=ON -DOVMS_DOCS_DIR=<path_to_OVMS_repo>`
+
+> > **Note:** When building the Python API documentation, the OpenVINO package version specified in [conf.py](./sphinx_setup/conf.py) is automatically downloaded using the [installation script](./scripts/install_appropriate_openvino_version.py).
+> If you need a specific version or want to use an already installed OpenVINO package, modify these files accordingly.
diff --git a/docs/scripts/install_appropriate_openvino_version.py b/docs/scripts/install_appropriate_openvino_version.py
index 262fd13d771..c2848a2dc1c 100644
--- a/docs/scripts/install_appropriate_openvino_version.py
+++ b/docs/scripts/install_appropriate_openvino_version.py
@@ -31,6 +31,13 @@ def install_package(python_executable, package):
subprocess.check_call([f'{python_executable}', '-m', 'pip', 'install', '-U', package, '--no-cache-dir'])
+def install_package_from_simple(python_executable, package):
+ subprocess.check_call([
+ f'{python_executable}', '-m', 'pip', 'install', '--pre', package,
+ '--extra-index-url', 'https://storage.openvinotoolkit.org/simple/wheels/nightly'
+ ])
+
+
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--ov_dir', type=Path, help='OpenVINO docs directory')
@@ -41,8 +48,12 @@ def main():
version_name = determine_openvino_version(args.ov_dir.joinpath("conf.py"))
if version_name == "nightly":
- install_package(args.python, "openvino-nightly")
- print("OpenVINO nightly version installed. OpenVINO GenAI nightly version is not available.")
+ install_package_from_simple(args.python, "openvino")
+ if args.enable_genai == 'ON':
+ install_package_from_simple(args.python, "openvino-genai")
+ print("OpenVINO nightly version installed. GenAI API nightly version installed.")
+ else:
+ print("OpenVINO nightly version installed. GenAI API disabled.")
elif version_name is None or version_name == "latest":
install_package(args.python, "openvino")
if args.enable_genai == 'ON':
@@ -63,4 +74,4 @@ def main():
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()