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
[JS] Add build NodeJS bindings into Manylinux 2_28 (#31611)
Kirill Suvorov14ab3b21836c
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tagindex 86ac40243fa..66917fb49c8 100644--- a/.github/dockerfiles/docker_tag+++ b/.github/dockerfiles/docker_tag@@ -1 +1 @@-pr-31335\ No newline at end of file+pr-31611diff --git a/.github/dockerfiles/ov_test/ubuntu_22_04_x64/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_22_04_x64/Dockerfileindex f1615bf3053..dcf09c8928a 100644--- a/.github/dockerfiles/ov_test/ubuntu_22_04_x64/Dockerfile+++ b/.github/dockerfiles/ov_test/ubuntu_22_04_x64/Dockerfile@@ -32,6 +32,11 @@ RUN apt-get update && \python3.11-venv \python3.11-distutils \libhdf5-dev \+ # JS API+ xvfb \+ libgtk-3-0 \+ libgbm1 \+ libnss3 \# For TF Models testswget \# libGL for PyTorch Models testsdiff --git a/.github/workflows/job_openvino_js.yml b/.github/workflows/job_openvino_js.ymlindex ac90c0b73d9..ecd4df62676 100644--- a/.github/workflows/job_openvino_js.yml+++ b/.github/workflows/job_openvino_js.yml@@ -12,6 +12,11 @@ on:type: stringrequired: falsedefault: null+ nodejs-version:+ description: 'NodeJS version to setup. E.g., "22"'+ type: string+ required: false+ default: "21"permissions: read-all@@ -32,7 +37,7 @@ jobs:DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user inputOPENVINO_JS_DIR: ${{ github.workspace }}/src/bindings/js/nodeOPENVINO_JS_LIBS_DIR: ${{ github.workspace }}/src/bindings/js/node/bin- NODE_VERSION: 21+ NODE_VERSION: ${{ inputs.nodejs-version }}DISPLAY: ':99'steps:- name: Fetch OpenVINO JS sources@@ -49,16 +54,15 @@ jobs:- name: Download OpenVINO artifacts (JS)uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0with:- name: openvino_js_package- path: ${{ env.OPENVINO_JS_LIBS_DIR }}+ name: openvino_node_npm_package+ path: ${{ env.OPENVINO_JS_DIR }}merge-multiple: true- name: Extract OpenVINO packages- run: pigz -dc openvino_js_package.tar.gz | tar -xf - -v- working-directory: ${{ env.OPENVINO_JS_LIBS_DIR }}+ run: pigz -dc openvino_node_npm_package.tar.gz | tar -xf - -v+ working-directory: ${{ env.OPENVINO_JS_DIR }}- name: Setup Node ${{ env.NODE_VERSION }}- if: runner.os != 'Linux' # Node is already installed in the Docker imageuses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0with:node-version: ${{ env.NODE_VERSION }}diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.ymlindex 3383a864bd3..0abdce5b22a 100644--- a/.github/workflows/manylinux_2_28.yml+++ b/.github/workflows/manylinux_2_28.yml@@ -120,6 +120,7 @@ jobs:ARTIFACTS_SHARE: "/mount/build-artifacts"MANIFEST_PATH: ${{ github.workspace }}/manifest.ymlPRODUCT_TYPE: public_manylinux_2_28_x86_64_release+ NODE_VERSION: 22steps:- name: Clone OpenVINO@@ -129,6 +130,11 @@ jobs:path: ${{ env.OPENVINO_REPO }}submodules: 'true'+ - name: Setup Node ${{ env.NODE_VERSION }}+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0+ with:+ node-version: ${{ env.NODE_VERSION }}+- name: System infouses: ./src/.github/actions/system_info@@ -181,6 +187,15 @@ jobs:done+ - name: Build OpenVINO JS API+ run: |+ /usr/bin/cmake -UTBB* -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} \+ -DCPACK_GENERATOR=NPM \+ -DENABLE_SYSTEM_TBB=OFF \+ -DENABLE_WHEEL=OFF+ /usr/bin/cmake --build ${{ env.BUILD_DIR }} --parallel $(nproc)+ /usr/bin/cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.OPENVINO_REPO }}/src/bindings/js/node/bin+- name: Pack Artifactsrun: mkdir -p ${{ env.BUILD_DIR }} && tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_package.tar.gzworking-directory: ${{ env.INSTALL_DIR }}@@ -189,6 +204,13 @@ jobs:run: tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_tests.tar.gzworking-directory: ${{ env.INSTALL_TEST_DIR }}+ - name: Pack openvino_node_npm_package+ run: |+ npm i+ npm pack+ tar -czvf ${BUILD_DIR}/openvino_node_npm_package.tar.gz bin openvino-node-*+ working-directory: ${{ env.OPENVINO_REPO }}/src/bindings/js/node+## Upload build artifacts#@@ -216,6 +238,14 @@ jobs:path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gzif-no-files-found: 'error'+ - name: Upload openvino-node NPM package+ if: ${{ always() }}+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2+ with:+ name: openvino_node_npm_package+ path: ${{ env.BUILD_DIR }}/openvino_node_npm_package.tar.gz+ if-no-files-found: 'error'+- name: Store artifacts to a shared driveid: store_artifactsif: ${{ always() }}@@ -224,6 +254,7 @@ jobs:artifacts: |${{ env.BUILD_DIR }}/openvino_package.tar.gz${{ env.BUILD_DIR }}/openvino_tests.tar.gz+ ${{ env.BUILD_DIR }}/openvino_node_npm_package.tar.gz${{ env.MANIFEST_PATH }}${{ env.INSTALL_WHEELS_DIR }}/wheelsstorage_dir: ${{ env.PRODUCT_TYPE }}@@ -254,9 +285,26 @@ jobs:affected-components: ${{ needs.smart_ci.outputs.affected_components }}python-version: ${{ matrix.python-version }}+ NodeJS_API_Tests:+ name: NodeJS API tests+ needs: [ Docker, Build, Smart_CI ]+ uses: ./.github/workflows/job_openvino_js.yml+ strategy:+ fail-fast: false+ matrix:+ include:+ - nodejs-version: 20+ image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64 }}+ - nodejs-version: 22+ image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64 }}+ with:+ runner: 'aks-linux-4-cores-16gb'+ image: ${{ matrix.image }}+ nodejs-version: ${{ matrix.nodejs-version }}+Overall_Status:name: ci/gha_overall_status_manylinux_2_28- needs: [Smart_CI, Build, Python_API_Tests]+ needs: [Smart_CI, Build, Python_API_Tests, NodeJS_API_Tests]if: ${{ always() }}runs-on: ubuntu-lateststeps: