OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CI] [GHA] Build additional Python packages for Python 3.9-3.12 (#29889)
Andrei Kashchikhinbc2a37903591
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tagindex ce4f85afe44..9a913a45d05 100644--- a/.github/dockerfiles/docker_tag+++ b/.github/dockerfiles/docker_tag@@ -1 +1 @@-pr-28972+pr-29889diff --git a/.github/dockerfiles/ov_build/debian_10_arm/Dockerfile b/.github/dockerfiles/ov_build/debian_10_arm/Dockerfileindex 0f64afbb20f..b55932b70e7 100644--- a/.github/dockerfiles/ov_build/debian_10_arm/Dockerfile+++ b/.github/dockerfiles/ov_build/debian_10_arm/Dockerfile@@ -12,7 +12,7 @@ RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \ENV DEBIAN_FRONTEND="noninteractive" \TZ="Europe/London"-RUN apt-get update && \+RUN dpkg --add-architecture armhf && apt-get update && \apt-get install \software-properties-common \curl \@@ -21,7 +21,7 @@ RUN apt-get update && \tzdata \# parallel gzippigz \- # Pythons \+ # Pythonpython3 \python3-pip \python3-dev \@@ -30,10 +30,10 @@ RUN apt-get update && \libhdf5-dev \# For building Python from sourcebuild-essential \- libffi-dev \libgdbm-dev \libc6-dev \libssl-dev \+ libffi-dev \zlib1g-dev \libbz2-dev \libreadline-dev \@@ -46,6 +46,22 @@ RUN apt-get update && \libxmlsec1-dev \liblzma-dev \wget \+ libavcodec58:armhf \+ libusb-1.0-0-dev:armhf \+ libboost-regex-dev:armhf \+ crossbuild-essential-armhf \+ libgtk-3-dev:armhf \+ libavcodec-dev:armhf \+ libavformat-dev:armhf \+ libswscale-dev:armhf \+ libgstreamer1.0-dev:armhf \+ libpython-dev:armhf \+ libgstreamer-plugins-base1.0-dev:armhf \+ zlib1g-dev:armhf \+ nlohmann-json-dev \+ libgflags-dev:armhf \+ libtbb-dev:armhf \+ libffi-dev:armhf \# Compilersgcc-arm-linux-gnueabihf \g++-arm-linux-gnueabihf \@@ -70,19 +86,140 @@ RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \ENV PATH="$SCCACHE_HOME:$PATH"-# Setup Python+# Build Pythons+# Python 3.9++# To cross-compile Python 3.9 we need to first compile it for the host+RUN wget https://www.python.org/ftp/python/3.9.21/Python-3.9.21.tar.xz++RUN tar -xf Python-3.9.21.tar.xz && \+ cd Python-3.9.21 && \+ ./configure --enable-optimizations && \+ make -j $(nproc) && \+ make altinstall++# Compile Python 3.9 for ARM+RUN cd Python-3.9.21 && make distclean && \+ ./configure \+ --host=arm-linux-gnueabihf \+ --build=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) \+ --disable-ipv6 \+ --enable-shared \+ --prefix=/opt/python3.9_arm \+ ac_cv_file__dev_ptmx=no \+ ac_cv_file__dev_ptc=no && \+ make -j $(nproc) && make altinstall++# Python 3.10+# To cross-compile Python 3.10 we need to first compile it for the host+RUN wget https://www.python.org/ftp/python/3.10.16/Python-3.10.16.tar.xz++RUN tar -xf Python-3.10.16.tar.xz && \+ cd Python-3.10.16 && \+ ./configure --enable-optimizations && \+ make -j $(nproc) && \+ make altinstall++# Compile Python 3.10 for ARM+RUN cd Python-3.10.16 && make distclean && \+ ./configure \+ --host=arm-linux-gnueabihf \+ --build=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) \+ --disable-ipv6 \+ --enable-shared \+ --prefix=/opt/python3.10_arm \+ ac_cv_file__dev_ptmx=no \+ ac_cv_file__dev_ptc=no && \+ make -j $(nproc) && make altinstall++# Upgrade openssl to 3.3.1 for Python3.11 - 3.13 ssl module+RUN wget https://www.openssl.org/source/openssl-3.3.1.tar.gz && \+ tar -zxf openssl-3.3.1.tar.gz && \+ cd openssl-3.3.1 && \+ ./config && \+ make install && \+ ln -sf /usr/local/bin/openssl /usr/bin/openssl && \+ echo /usr/local/lib64 | tee /etc/ld.so.conf.d/custom.conf && \+ ldconfig && \+ openssl version++# Python 3.11+# To cross-compile Python 3.11 we need to first compile it for the hostRUN wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tar.xzRUN tar -xf Python-3.11.9.tar.xz && \cd Python-3.11.9 && \- ./configure --enable-optimizations && \- make -j 8 && \+ LDFLAGS="-L/usr/local/lib64" ./configure --with-openssl=/usr/local --with-openssl-rpath=auto && \+ make -j $(nproc) && \+ make altinstall++# Compile Python 3.11 for ARM+RUN cd Python-3.11.9 && make distclean && \+ ./configure \+ --host=arm-linux-gnueabihf \+ --build=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) \+ --disable-ipv6 \+ --enable-shared \+ --with-build-python \+ --prefix=/opt/python3.11_arm \+ ac_cv_file__dev_ptmx=no \+ ac_cv_file__dev_ptc=no && \+ make -j $(nproc) && make altinstall++# Python 3.12+# To cross-compile Python 3.12 we need to first compile it for the host+RUN wget https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tar.xz++RUN tar -xf Python-3.12.9.tar.xz && \+ cd Python-3.12.9 && \+ LDFLAGS="-L/usr/local/lib64" ./configure --with-openssl=/usr/local --with-openssl-rpath=auto && \+ make -j $(nproc) && \+ make altinstall++# Compile Python 3.12 for ARM+RUN cd Python-3.12.9 && make distclean && \+ ./configure \+ --host=arm-linux-gnueabihf \+ --build=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) \+ --disable-ipv6 \+ --enable-shared \+ --with-build-python \+ --prefix=/opt/python3.12_arm \+ ac_cv_file__dev_ptmx=no \+ ac_cv_file__dev_ptc=no && \+ make -j $(nproc) && make altinstall++# Python 3.13+# To cross-compile Python 3.13 we need to first compile it for the host+RUN wget https://www.python.org/ftp/python/3.13.2/Python-3.13.2.tar.xz++RUN tar -xf Python-3.13.2.tar.xz && \+ cd Python-3.13.2 && \+ LDFLAGS="-L/usr/local/lib64" ./configure --with-openssl=/usr/local --with-openssl-rpath=auto && \+ make -j $(nproc) && \make altinstall+# Compile Python 3.13 for ARM+RUN cd Python-3.13.2 && make distclean && \+ ./configure \+ --host=arm-linux-gnueabihf \+ --build=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) \+ --disable-ipv6 \+ --enable-shared \+ --with-build-python \+ --prefix=/opt/python3.13_arm \+ ac_cv_file__dev_ptmx=no \+ ac_cv_file__dev_ptc=no && \+ make -j $(nproc) && make altinstall+# Setup pipENV PIP_VERSION="24.0"-RUN python3 -m pip install --upgrade pip==24.0-RUN python3.11 -m pip install --upgrade pip==24.0+RUN python3 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.9 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.10 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.11 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.12 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.13 -m pip install --upgrade pip==${PIP_VERSION}# Use Python 3.11 as default# Using venv here because other methods to switch the default Python break both system and wheels builddiff --git a/.github/dockerfiles/ov_build/fedora_29/Dockerfile b/.github/dockerfiles/ov_build/fedora_29/Dockerfileindex 0b9911ac707..473a094bf64 100644--- a/.github/dockerfiles/ov_build/fedora_29/Dockerfile+++ b/.github/dockerfiles/ov_build/fedora_29/Dockerfile@@ -32,11 +32,44 @@ RUN chmod +x /install_build_dependencies.sh && \/install_build_dependencies.sh && \rm -rf /var/lib/apt/lists/*-# Setup Python+# Build Pythons+# Python 3.9RUN cd /usr/src && \- wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz && \- tar xvf Python-3.9.9.tar.xz-RUN cd /usr/src/Python-3.9.9 && \+ wget https://www.python.org/ftp/python/3.9.21/Python-3.9.21.tar.xz && \+ tar xvf Python-3.9.21.tar.xz+RUN cd /usr/src/Python-3.9.21 && \+ ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \+ make altinstall++# Python 3.10+RUN cd /usr/src && \+ wget https://www.python.org/ftp/python/3.10.16/Python-3.10.16.tar.xz && \+ tar xvf Python-3.10.16.tar.xz+RUN cd /usr/src/Python-3.10.16 && \+ ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \+ make altinstall++# Python 3.11+RUN cd /usr/src && \+ wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tar.xz && \+ tar xvf Python-3.11.9.tar.xz+RUN cd /usr/src/Python-3.11.9 && \+ ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \+ make altinstall++# Python 3.12+RUN cd /usr/src && \+ wget https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tar.xz && \+ tar xvf Python-3.12.9.tar.xz+RUN cd /usr/src/Python-3.12.9 && \+ ./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \+ make altinstall++# Python 3.13+RUN cd /usr/src && \+ wget https://www.python.org/ftp/python/3.13.2/Python-3.13.2.tar.xz && \+ tar xvf Python-3.13.2.tar.xz+RUN cd /usr/src/Python-3.13.2 && \./configure --enable-optimizations --enable-loadable-sqlite-extensions --prefix=/usr && \make altinstall@@ -61,6 +94,10 @@ RUN alternatives --install /usr/bin/python python /usr/bin/python3.9 10ENV PIP_VERSION="24.0"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \python3.9 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.10 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \rm -f get-pip.pyENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}diff --git a/.github/dockerfiles/ov_build/ubuntu_20_04_arm64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_20_04_arm64/Dockerfileindex 7653fe6abb7..dd4d2bd496e 100644--- a/.github/dockerfiles/ov_build/ubuntu_20_04_arm64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_20_04_arm64/Dockerfile@@ -26,12 +26,19 @@ RUN apt-get update && \# parallel gzippigz \# Pythons- python3.8-dev \- python3.8-venv \- python3.8-distutils \+ python3.9-dev \+ python3.9-venv \+ python3.9-distutils \+ python3.10-dev \+ python3.10-venv \+ python3.10-distutils \python3.11-dev \python3.11-venv \python3.11-distutils \+ python3.12-dev \+ python3.12-venv \+ python3.13-dev \+ python3.13-venv \libhdf5-dev \# For Java APIdefault-jdk \@@ -64,8 +71,12 @@ RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \# Setup pipENV PIP_VERSION="24.0"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \- python3.8 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.9 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.10 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \rm -f get-pip.py# Use Python 3.11 as default instead of Python 3.8diff --git a/.github/dockerfiles/ov_build/ubuntu_20_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_20_04_x64/Dockerfileindex 1620e674ef6..2449849a847 100644--- a/.github/dockerfiles/ov_build/ubuntu_20_04_x64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_20_04_x64/Dockerfile@@ -28,6 +28,16 @@ RUN apt-get update && \python3.9-dev \python3.9-venv \python3.9-distutils \+ python3.10-dev \+ python3.10-venv \+ python3.10-distutils \+ python3.11-dev \+ python3.11-venv \+ python3.11-distutils \+ python3.12-dev \+ python3.12-venv \+ python3.13-dev \+ python3.13-venv \# For Java APIdefault-jdk \&& \@@ -56,6 +66,10 @@ ENV PIP_VERSION="24.0"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.9 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.10 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \rm -f get-pip.py# Use Python 3.9 as default instead of Python 3.8diff --git a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfileindex 56dffb11e7c..41919a522fa 100644--- a/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_22_04_x64/Dockerfile@@ -25,10 +25,20 @@ RUN apt-get update && \libtbb2 \# parallel gzippigz \- # Pythons \+ # Pythons+ python3.9-dev \+ python3.9-venv \+ python3.9-distutils \+ python3.10-dev \+ python3.10-venv \+ python3.10-distutils \python3.11-dev \python3.11-venv \python3.11-distutils \+ python3.12-dev \+ python3.12-venv \+ python3.13-dev \+ python3.13-venv \# For Java APIdefault-jdk \&& \@@ -54,8 +64,12 @@ ENV PATH="$SCCACHE_HOME:$PATH"# Setup pipENV PIP_VERSION="24.0"RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \- python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.9 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.10 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \python3.11 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.12 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \+ python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \rm -f get-pip.py# Use Python 3.11 as defaultdiff --git a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfileindex 82a51ffc0b1..622441838a2 100644--- a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile+++ b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile@@ -24,7 +24,20 @@ RUN apt-get update && \tzdata \# parallel gzippigz \- # Python+ # Pythons+ python3.9-dev \+ python3.9-venv \+ python3.9-distutils \+ python3.10-dev \+ python3.10-venv \+ python3.10-distutils \+ python3.11-dev \+ python3.11-venv \+ python3.11-distutils \+ python3.12-dev \+ python3.12-venv \+ python3.13-dev \+ python3.13-venv \python3-dev \python3-venv \python3-pip \@@ -59,6 +72,11 @@ ENV PATH="/venv/bin:$PATH"# Setup pipENV PIP_VERSION="24.0"-RUN /venv/bin/python3 -m pip install --upgrade pip==${PIP_VERSION}+RUN /venv/bin/python3 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.9 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.10 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.11 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.12 -m pip install --upgrade pip==${PIP_VERSION} && \+ python3.13 -m pip install --upgrade pip==${PIP_VERSION}ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION}diff --git a/.github/workflows/debian_10_arm.yml b/.github/workflows/debian_10_arm.ymlindex 4702d3cf911..17c7d99bf6d 100644--- a/.github/workflows/debian_10_arm.yml+++ b/.github/workflows/debian_10_arm.yml@@ -87,6 +87,7 @@ jobs:build-debian-packages: falsebuild-contrib: falsebuild-rpm-packages: false+ build-additional-python-packages: truecmake-options: >--DTHREADS_PTHREAD_ARG=-pthread-DCMAKE_COMPILE_WARNING_AS_ERROR=OFFdiff --git a/.github/workflows/fedora_29.yml b/.github/workflows/fedora_29.ymlindex 5132c61d082..49fe82f5afb 100644--- a/.github/workflows/fedora_29.yml+++ b/.github/workflows/fedora_29.yml@@ -85,6 +85,7 @@ jobs:build-debian-packages: falsebuild-js: falsebuild-rpm-packages: true+ build-additional-python-packages: truecmake-options: >--G 'Ninja'-DENABLE_CPPLINT=OFFdiff --git a/.github/workflows/job_build_linux.yml b/.github/workflows/job_build_linux.ymlindex 29a443df269..9cc5d81c75e 100644--- a/.github/workflows/job_build_linux.yml+++ b/.github/workflows/job_build_linux.yml@@ -51,6 +51,11 @@ on:type: booleanrequired: falsedefault: false+ build-additional-python-packages:+ description: 'Whether to build additional, i.e., non-system Python packages. Should have Python 3.9-3.13 installed'+ type: boolean+ required: false+ default: falsepermissions: read-all@@ -189,10 +194,39 @@ jobs:- name: Cmake install - OpenVINOrun: |cmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_DIR}- cmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_WHEELS_DIR} --component python_wheelscmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_TEST_DIR} --component testscmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${DEVELOPER_PACKAGE_DIR} --component developer_package+ - name: Install Python wheels for the main Python+ if: ${{ ! inputs.build-additional-python-packages }}+ run: cmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_WHEELS_DIR} --component python_wheels++ - name: Build Python API and wheels+ if: ${{ inputs.build-additional-python-packages }}+ run: |+ for py_version in "3.9" "3.10" "3.11" "3.12" "3.13"+ do+ export PY_BUILD_DIR=${{ github.workspace }}/py$py_version+ mkdir -p $PY_BUILD_DIR++ python_exec_path=$(python$py_version -c "import sys; print(sys.executable)")++ $python_exec_path -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt++ CMAKE_OPTIONS="-DPython3_EXECUTABLE=$python_exec_path -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${BUILD_DIR}"+ if [[ "${OS}" == 'debian_10' ]]; then+ echo "Adding ARM specific CMake options"+ CMAKE_OPTIONS+=" -DCMAKE_TOOLCHAIN_FILE=/__w/openvino/openvino/openvino/cmake/arm.toolchain.cmake -DPYTHON_MODULE_EXTENSION=$(/opt/python${py_version}_arm/bin/python${py_version}-config --extension-suffix) -DPython3_INCLUDE_DIR=/opt/python${py_version}_arm/include/python${py_version}"+ fi++ cmake ${CMAKE_OPTIONS} -S ${OPENVINO_REPO}/src/bindings/python -B ${PY_BUILD_DIR}+ cmake --build ${PY_BUILD_DIR} --parallel $(nproc)+ cmake --install ${PY_BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_DIR} --component pyopenvino_python$py_version+ cmake --install ${PY_BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_WHEELS_DIR} --component python_wheels+ done+ env:+ OS: ${{ inputs.os }}+- name: Pack openvino_packagerun: tar -cvf - * | pigz > ${BUILD_DIR}/openvino_package.tar.gzworking-directory: ${{ env.INSTALL_DIR }}diff --git a/.github/workflows/job_build_windows.yml b/.github/workflows/job_build_windows.ymlindex 4c7347b6059..246808ed031 100644--- a/.github/workflows/job_build_windows.yml+++ b/.github/workflows/job_build_windows.yml@@ -185,7 +185,6 @@ jobs:- name: Cmake install - OpenVINOrun: |cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }}- cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheelscmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component testscmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_PDB_DIR }} --component pdbcmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DEV_PACKAGE }} --component developer_package@@ -220,10 +219,20 @@ jobs:should-setup-pip-paths: 'true'self-hosted-runner: 'true'+ # Setup additional Python versions for wheels building+ - name: Setup Python 3.13+ if: ${{ inputs.build-additional-python-wheels }}+ uses: ./openvino/.github/actions/setup_python+ with:+ version: '3.13'+ pip-cache-path: ${{ env.PIP_CACHE_PATH }}+ should-setup-pip-paths: 'true'+ self-hosted-runner: 'true'+- name: Build additional Python wheelsif: ${{ inputs.build-additional-python-wheels }}run: |- $pyVersions = '3.9', '3.10', '3.12'+ $pyVersions = '3.9', '3.10', '3.11', '3.12', '3.13'foreach ($pyVersion in $pyVersions) {$pyBuildDir = "${{ github.workspace }}/py$pyVersion"New-Item -ItemType Directory -Path "$pyBuildDir" -Force@@ -237,9 +246,10 @@ jobs:& $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt- cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" &&+ cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" &&cmake --build "$pyBuildDir" --parallel $ENV:NUMBER_OF_PROCESSORS --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} &&- cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels+ cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels &&+ cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }} --component pyopenvino_python$pyVersionif ($LASTEXITCODE -ne 0) {Write-Host "Failed to build Python wheels for Python $pyVersion"exit 1diff --git a/.github/workflows/job_jax_models_tests.yml b/.github/workflows/job_jax_models_tests.ymlindex 961bc03fdeb..acc24b30475 100644--- a/.github/workflows/job_jax_models_tests.yml+++ b/.github/workflows/job_jax_models_tests.yml@@ -57,6 +57,7 @@ jobs:echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"+ echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"echo "MODEL_HUB_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/model_hub_tests" >> "$GITHUB_ENV"echo "HF_HUB_CACHE=/mount/caches/huggingface" >> "$GITHUB_ENV"@@ -69,12 +70,13 @@ jobs:pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR}working-directory: ${{ env.INSTALL_DIR }}- - name: Fetch setup_python action+ - name: Fetch setup_python and install wheels actionsuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2timeout-minutes: 15with:sparse-checkout: |.github/actions/setup_python/action.yml+ .github/actions/install_ov_wheels/action.ymlsparse-checkout-cone-mode: falsepath: 'openvino'@@ -86,15 +88,14 @@ jobs:self-hosted-runner: ${{ contains(inputs.runner, 'aks') }}- name: Install OpenVINO Python wheels- run: |- # To enable pytest parallel features- python3 -m pip install pytest-xdist[psutil]- python3 -m pip install ./openvino-*- python3 -m pip install ./openvino_tokenizers-*- working-directory: ${{ env.INSTALL_WHEELS_DIR }}+ uses: ./openvino/.github/actions/install_ov_wheels+ with:+ wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}+ wheels-to-install: 'openvino openvino_tokenizers'- - name: Install JAX tests requirements for precommit+ - name: Install prerequisites and JAX tests requirements for precommitrun: |+ python3 -m pip install pytest-xdist[psutil]python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/requirements_jax- name: JAX/Flax Models Tests from Hugging Facediff --git a/.github/workflows/job_onnx_models_tests.yml b/.github/workflows/job_onnx_models_tests.ymlindex ad6a6124b58..320639603e7 100644--- a/.github/workflows/job_onnx_models_tests.yml+++ b/.github/workflows/job_onnx_models_tests.yml@@ -45,7 +45,7 @@ jobs:pattern: openvino_[tests]*path: ${{ env.INSTALL_DIR }}merge-multiple: true-+- name: Download OpenVINO artifacts (wheels)uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1with:@@ -59,6 +59,7 @@ jobs:echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"+ echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"echo "MODELS_SHARE_PATH=/mount/testdata$((GITHUB_RUN_NUMBER % NUMBER_OF_REPLICAS))" >> "$GITHUB_ENV"echo "LOGS_FOLDER=$GITHUB_WORKSPACE/onnx_models_tests_logs" >> "$GITHUB_ENV"echo "HF_HUB_CACHE=/mount/caches/huggingface" >> "$GITHUB_ENV"@@ -87,11 +88,20 @@ jobs:# - name: Update Models# run: bash ${OPENVINO_REPO}/src/frontends/onnx/tests/tests_python/model_zoo_preprocess.sh -d ${MODELS_SHARE_PATH} -o -s "${{ env.ONNX_MODEL_ZOO_SHA }}"+ - name: Fetch install wheels action+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2+ timeout-minutes: 15+ with:+ sparse-checkout: |+ .github/actions/install_ov_wheels/action.yml+ sparse-checkout-cone-mode: false+ path: 'action_root'+- name: Install OpenVINO Python wheels- run: |- # Install the core OV wheel- python3 -m pip install ./openvino-*.whl- working-directory: ${{ env.INSTALL_WHEELS_DIR }}+ uses: ./action_root/.github/actions/install_ov_wheels+ with:+ wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}+ wheels-to-install: 'openvino'- name: Install ONNX Models tests requirementsrun: python3 -m pip install -r ${INSTALL_TEST_DIR}/requirements_onnxdiff --git a/.github/workflows/job_pytorch_models_tests.yml b/.github/workflows/job_pytorch_models_tests.ymlindex 4a9fed861fd..e2b8f2afa90 100644--- a/.github/workflows/job_pytorch_models_tests.yml+++ b/.github/workflows/job_pytorch_models_tests.yml@@ -58,6 +58,7 @@ jobs:echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"+ echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"echo "MODEL_HUB_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/model_hub_tests" >> "$GITHUB_ENV"echo "HF_HUB_CACHE=/mount/caches/huggingface" >> "$GITHUB_ENV"@@ -70,12 +71,13 @@ jobs:pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR}working-directory: ${{ env.INSTALL_DIR }}- - name: Fetch setup_python action+ - name: Fetch setup_python and install wheels actionsuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2timeout-minutes: 15with:sparse-checkout: |.github/actions/setup_python/action.yml+ .github/actions/install_ov_wheels/action.ymlsparse-checkout-cone-mode: falsepath: 'openvino'@@ -87,11 +89,10 @@ jobs:self-hosted-runner: ${{ contains(inputs.runner, 'aks') }}- name: Install OpenVINO Python wheels- run: |- # To enable pytest parallel features- python3 -m pip install ./openvino-*- python3 -m pip install ./openvino_tokenizers-*- working-directory: ${{ env.INSTALL_WHEELS_DIR }}+ uses: ./openvino/.github/actions/install_ov_wheels+ with:+ wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}+ wheels-to-install: 'openvino openvino_tokenizers'- name: Install PyTorch tests requirementsrun: |diff --git a/.github/workflows/job_tensorflow_models_tests.yml b/.github/workflows/job_tensorflow_models_tests.ymlindex 0d6940341bc..7bb68981505 100644--- a/.github/workflows/job_tensorflow_models_tests.yml+++ b/.github/workflows/job_tensorflow_models_tests.yml@@ -58,6 +58,7 @@ jobs:echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"+ echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/wheels" >> "$GITHUB_ENV"echo "MODEL_HUB_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/model_hub_tests" >> "$GITHUB_ENV"echo "TFHUB_CACHE_DIR=/mount/testdata$((GITHUB_RUN_NUMBER % NUMBER_OF_REPLICAS))/tfhub_models" >> "$GITHUB_ENV"echo "HF_HUB_CACHE=/mount/caches/huggingface" >> "$GITHUB_ENV"@@ -70,12 +71,13 @@ jobs:run: pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR}working-directory: ${{ env.INSTALL_DIR }}- - name: Fetch setup_python action+ - name: Fetch setup_python and install wheels actionsuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2timeout-minutes: 15with:sparse-checkout: |.github/actions/setup_python/action.yml+ .github/actions/install_ov_wheels/action.ymlsparse-checkout-cone-mode: falsepath: 'openvino'@@ -87,10 +89,10 @@ jobs:self-hosted-runner: ${{ contains(inputs.runner, 'aks') }}- name: Install OpenVINO Python wheels- run: |- python3 -m pip install ./openvino-*- python3 -m pip install ./openvino_tokenizers-*- working-directory: ${{ env.INSTALL_WHEELS_DIR }}+ uses: ./openvino/.github/actions/install_ov_wheels+ with:+ wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}+ wheels-to-install: 'openvino openvino_tokenizers'- name: Install TF Models tests requirementsrun: python3 -m pip install -r ${INSTALL_TEST_DIR}/requirements_tensorflowdiff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.ymlindex 4b9ef8a49c8..e4fbfe3db68 100644--- a/.github/workflows/linux_arm64.yml+++ b/.github/workflows/linux_arm64.yml@@ -90,6 +90,7 @@ jobs:build-contrib: truebuild-debian-packages: falsebuild-rpm-packages: false+ build-additional-python-packages: truecmake-options: >--G 'Ninja Multi-Config'-DENABLE_CPPLINT=OFFdiff --git a/.github/workflows/manylinux_2014.yml b/.github/workflows/manylinux_2014.ymlindex 6e297299522..74de63793f3 100644--- a/.github/workflows/manylinux_2014.yml+++ b/.github/workflows/manylinux_2014.yml@@ -165,19 +165,17 @@ jobs:cmake --install /work/build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /work/api_tests --component tests"- - name: Pack Artifacts- run: mkdir -p ${{ env.BUILD_DIR }} && tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_package.tar.gz- working-directory: ${{ env.INSTALL_DIR }}-- name: Build Python API (Python 3.9-3.13)run: |- SUPPORTED_PYTHON_VERSIONS=("39" "310" "311" "312" "313")+ SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13")for PY_VER in "${SUPPORTED_PYTHON_VERSIONS[@]}"; do- python_path=/opt/python/cp${PY_VER}-cp${PY_VER}/bin+ simpler_python_version=$(echo $PY_VER | sed -e 's/\.//g')+ python_path=/opt/python/cp${simpler_python_version}-cp${simpler_python_version}/bindocker run --rm \-v ${{ env.OPENVINO_REPO }}:/work/src \-v ${{ env.INSTALL_WHEELS_DIR }}:/work/wheels \-v ${{ env.PIP_CACHE_PATH }}:/work/pip_cache \+ -v ${{ env.INSTALL_DIR }}:/work/install \-v ov_build_cache:/work/build \-e SCCACHE_AZURE_BLOB_CONTAINER \-e SCCACHE_AZURE_CONNECTION_STRING \@@ -197,11 +195,16 @@ jobs:export "PIP_CACHE_DIR=/work/pip_cache/${PIP_VER}"python3 -m pip install -r /work/src/src/bindings/python/wheel/requirements-dev.txt &&cmake -DOpenVINODeveloperPackage_DIR=/work/build -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S /work/src/src/bindings/python -B /work/build_py${PY_VER} &&- cmake --build /work/build_py${PY_VER} --parallel $(nproc) --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} &&- cmake --install /work/build_py${PY_VER} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /work/wheels --component python_wheels+ cmake --build /work/build_py${PY_VER} --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }} &&+ cmake --install /work/build_py${PY_VER} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /work/wheels --component python_wheels &&+ cmake --install /work/build_py${PY_VER} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /work/install --component pyopenvino_python${PY_VER}"done+ - name: Pack Artifacts+ run: mkdir -p ${{ env.BUILD_DIR }} && tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_package.tar.gz+ working-directory: ${{ env.INSTALL_DIR }}+- name: Pack openvino_testsrun: tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_tests.tar.gzworking-directory: ${{ env.INSTALL_TEST_DIR }}diff --git a/.github/workflows/ubuntu_20.yml b/.github/workflows/ubuntu_20.ymlindex ea297191142..50e5e872834 100644--- a/.github/workflows/ubuntu_20.yml+++ b/.github/workflows/ubuntu_20.yml@@ -91,6 +91,7 @@ jobs:build-debian-packages: truebuild-js: truebuild-rpm-packages: false+ build-additional-python-packages: truecmake-options: >--G 'Ninja Multi-Config'-DENABLE_CPPLINT=OFF@@ -101,6 +102,7 @@ jobs:-DCMAKE_VERBOSE_MAKEFILE=ON-DCPACK_GENERATOR=TGZ-DENABLE_WHEEL=ON+ -DENABLE_PYTHON=ON-DCMAKE_COMPILE_WARNING_AS_ERROR=ONCXX_Unit_Tests:diff --git a/.github/workflows/ubuntu_22.yml b/.github/workflows/ubuntu_22.ymlindex f2ab07bf809..e2eccd219dd 100644--- a/.github/workflows/ubuntu_22.yml+++ b/.github/workflows/ubuntu_22.yml@@ -94,6 +94,7 @@ jobs:build-contrib: truebuild-debian-packages: truebuild-rpm-packages: false+ build-additional-python-packages: truecmake-options: >--G 'Ninja Multi-Config'-DENABLE_CPPLINT=OFFdiff --git a/.github/workflows/ubuntu_24.yml b/.github/workflows/ubuntu_24.ymlindex 8dccc0e7105..f790a931f08 100644--- a/.github/workflows/ubuntu_24.yml+++ b/.github/workflows/ubuntu_24.yml@@ -88,6 +88,7 @@ jobs:build-js: truebuild-debian-packages: truebuild-contrib: true+ build-additional-python-packages: truecmake-options: >--G 'Ninja Multi-Config'-DENABLE_CPPLINT=OFFdiff --git a/.github/workflows/windows_vs2022_release.yml b/.github/workflows/windows_vs2022_release.ymlindex 472eeba54d7..df04e4004e4 100644--- a/.github/workflows/windows_vs2022_release.yml+++ b/.github/workflows/windows_vs2022_release.yml@@ -64,7 +64,7 @@ jobs:cmake-options: >--G 'Ninja Multi-Config'-DENABLE_PYTHON=ON- -DENABLE_WHEEL=ON+ -DENABLE_WHEEL=OFF-DENABLE_CPPLINT=OFF-DENABLE_TESTS=ON-DCMAKE_COMPILE_WARNING_AS_ERROR=ON