Skip to content

Latest commit

 

History

History
83 lines (70 loc) · 2 KB

README.md

File metadata and controls

83 lines (70 loc) · 2 KB

OpenVINO™ JavaScript Bindings

Folders

  • ./docs - documentation
  • ./node - openvino-node npm package

openvino-node Package Developer Documentation

Components

  • include - header files for current API.
  • lib - TypeScript sources for current API.
  • src - C++ sources for current API.
  • tests - tests directory for current API.

Build

  • Make sure that all submodules are updated:
    git submodule update --init --recursive
  • Create the build directory:
    mkdir build && cd build
  • Configure building of the binaries:
    cmake \
      -DCMAKE_BUILD_TYPE=Release \
      -DENABLE_FASTER_BUILD=ON \
      -DCPACK_GENERATOR=NPM \
      -DENABLE_SYSTEM_TBB=OFF -UTBB* \
      -DENABLE_TESTS=OFF \
      -DENABLE_SAMPLES=OFF \
      -DENABLE_WHEEL=OFF \
      -DENABLE_PYTHON=OFF \
      -DENABLE_INTEL_GPU=OFF \
      -DCMAKE_INSTALL_PREFIX=../src/bindings/js/node/bin \
      ..
  • Build the bindings:
    cmake --build . --config Release --verbose -j4
  • Install binaries for the openvino-node package:
    cmake --install .
  • Navigate to the npm package folder:
    cd ../src/bindings/js/node
  • Now, you can install dependencies packages and transpile ts to js code:
    npm install
  • Run tests to make sure that openvino-node has been built successfully:
    npm run test

Usage

  • Add the openvino-node package to your project by specifying it in package.json:
    "openvino-node": "file:*path-to-current-directory*"
  • Make sure to require it:
    const { addon: ov } = require('openvino-node');

Samples

OpenVINO™ Node.js Bindings Examples of Usage

See Also