Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cpack config for NPM build #73

Merged
merged 42 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
55606a7
Add node headers as submodules
vishniakov-nikolai Nov 27, 2023
734e487
Build nodejs bindings using cmake
vishniakov-nikolai Nov 27, 2023
e8d4b6b
Remove extra scripts
vishniakov-nikolai Nov 27, 2023
8163bad
Add .npmignore
vishniakov-nikolai Nov 27, 2023
4232b06
Replace submodules by cmake FetchContent
vishniakov-nikolai Nov 29, 2023
752f7ba
Replace path to package in tests
vishniakov-nikolai Nov 29, 2023
1499b75
Add task that exports compiled bindings
vishniakov-nikolai Nov 29, 2023
950a2ec
Fix cmake, update README
vishniakov-nikolai Nov 29, 2023
9e51e35
Revert and adapt download runtime scrips
vishniakov-nikolai Nov 29, 2023
28e0a14
Merge branch 'master' into feature/cmake-build
vishniakov-nikolai Nov 30, 2023
15ec488
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai Nov 30, 2023
22556ee
Adapt download_binaries script
vishniakov-nikolai Dec 5, 2023
da66821
Update download binaries script and package.json info
vishniakov-nikolai Dec 5, 2023
9d4056a
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai Dec 5, 2023
7dd39ae
Fix instruction
vishniakov-nikolai Dec 5, 2023
97d42e2
Add cpack config for NPM build
vishniakov-nikolai Dec 6, 2023
18fe98d
Extend config
vishniakov-nikolai Dec 7, 2023
99d2570
Added more exclude markers for install rules
ilya-lavrenov Dec 8, 2023
eea8bed
Merge branch 'cmake-install-rules' into feature/extend-cpack
vishniakov-nikolai Dec 11, 2023
0ca0fb4
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai Dec 11, 2023
69ebfd9
Update package config
vishniakov-nikolai Dec 11, 2023
56e33fb
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai Dec 12, 2023
3fcc58e
Combine files for npm binaries archive
vishniakov-nikolai Dec 12, 2023
bc1e460
Merge branch 'master' into feature/cmake-build
vishniakov-nikolai Dec 12, 2023
9db7956
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai Dec 12, 2023
a8a31a5
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai Dec 12, 2023
4e49a99
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai Dec 12, 2023
87a5198
Remove unnecessary commands
vishniakov-nikolai Dec 12, 2023
a6c3a3b
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai Dec 12, 2023
b678c19
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai Dec 12, 2023
3064e25
Ability to exclude TBB from install package
ilya-lavrenov Dec 13, 2023
da69e6b
Merge branch 'tbb' into feature/extend-cpack
vishniakov-nikolai Dec 13, 2023
d3219da
Ability to exclude TBB from install package
ilya-lavrenov Dec 13, 2023
2c0071a
Merge branch 'tbb' into feature/extend-cpack
vishniakov-nikolai Dec 13, 2023
b02e1f8
Adopt npm package to updated tbb
vishniakov-nikolai Dec 13, 2023
b008ffd
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai Dec 13, 2023
df549cc
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai Dec 13, 2023
566c42d
Use ov_set_install_rpath to define rpath in nodejs bindings
vishniakov-nikolai Dec 13, 2023
b616a62
Remove unnecessary files
vishniakov-nikolai Dec 13, 2023
9485d35
Fix review remarks
vishniakov-nikolai Dec 13, 2023
5cb1673
Specify README build instructions
vishniakov-nikolai Dec 14, 2023
0f53d72
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai Dec 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/archive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE_EXCLUDE_ALL EXCLUDE_FROM_ALL)
unset(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL)
unset(OV_CPACK_COMP_OPENVINO_REQ_FILES_EXCLUDE_ALL)
# nodejs
set(OV_CPACK_COMP_NPM_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# tools
set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
unset(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL)
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/common-libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# we don't need requirements.txt in package, because dependencies are installed by packages managers like conda
set(OV_CPACK_COMP_OPENVINO_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# nodejs
set(OV_CPACK_COMP_NPM_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# tools
set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL EXCLUDE_FROM_ALL)
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/debian/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# because numpy is installed by apt
set(OV_CPACK_COMP_OPENVINO_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# nodejs
set(OV_CPACK_COMP_NPM_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# tools
set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL EXCLUDE_FROM_ALL)
Expand Down
102 changes: 102 additions & 0 deletions cmake/developer_package/packaging/npm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#

include(GNUInstallDirs)

# Put all libraries in one dir
set(CMAKE_SKIP_INSTALL_RPATH OFF)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the comment is wrong

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment was fixed


#
# ov_npm_cpack_set_dirs()
#
# Set directories for cpack
#
macro(ov_npm_cpack_set_dirs)
set(OV_CPACK_INCLUDEDIR runtime/include)
set(OV_CPACK_IE_CMAKEDIR runtime/cmake)
set(OV_CPACK_NGRAPH_CMAKEDIR runtime/cmake)
set(OV_CPACK_OPENVINO_CMAKEDIR runtime/cmake)
set(OV_CPACK_DOCDIR docs)
set(OV_CPACK_LICENSESDIR licenses)
set(OV_CPACK_SAMPLESDIR samples)
set(OV_CPACK_WHEELSDIR tools)
set(OV_CPACK_TOOLSDIR tools)
set(OV_CPACK_DEVREQDIR tools)
set(OV_CPACK_PYTHONDIR python)

if(WIN32)
set(OV_CPACK_LIBRARYDIR ${ARCH_FOLDER}/${build_type})
set(OV_CPACK_RUNTIMEDIR ${ARCH_FOLDER}/${build_type})
set(OV_CPACK_ARCHIVEDIR ${ARCH_FOLDER}/${build_type})
elseif(APPLE)
set(OV_CPACK_LIBRARYDIR ${ARCH_FOLDER}/${build_type})
set(OV_CPACK_RUNTIMEDIR ${ARCH_FOLDER}/${build_type})
set(OV_CPACK_ARCHIVEDIR ${ARCH_FOLDER}/${build_type})
else()
set(OV_CPACK_LIBRARYDIR ".")
set(OV_CPACK_RUNTIMEDIR ".")
set(OV_CPACK_ARCHIVEDIR ".")
vishniakov-nikolai marked this conversation as resolved.
Show resolved Hide resolved
endif()

set(OV_CPACK_LIBRARYDIR ${OV_CPACK_RUNTIMEDIR})
set(OV_CPACK_ARCHIVEDIR ${OV_CPACK_RUNTIMEDIR})
set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR}/openvino-${OpenVINO_VERSION})
set(OV_CPACK_IE_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/inferenceengine${OpenVINO_VERSION})
set(OV_CPACK_NGRAPH_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/ngraph${OpenVINO_VERSION})
set(OV_CPACK_OPENVINO_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/openvino${OpenVINO_VERSION})
set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION})
set(OV_CPACK_LICENSESDIR licenses)
set(OV_CPACK_PYTHONDIR lib/python3/dist-packages)

# non-native stuff
set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino) # internal
set(OV_CPACK_SAMPLESDIR ${OV_CPACK_SHAREDIR}/samples)
set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR})
unset(OV_CPACK_SHAREDIR)

# skipped during debian packaging
set(OV_CPACK_WHEELSDIR "tools")
endmacro()

ov_npm_cpack_set_dirs()

#
# Override include / exclude rules for components
# This is required to exclude some files from installation
# (e.g. npm package requires only C++ Core component)
#

macro(ov_define_component_include_rules)
# core components
unset(OV_CPACK_COMP_CORE_EXCLUDE_ALL)
set(OV_CPACK_COMP_CORE_C_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_CORE_C_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# licensing
unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL)
# samples
set(OV_CPACK_COMP_CPP_SAMPLES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_C_SAMPLES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_PYTHON_SAMPLES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# python
set(OV_CPACK_COMP_PYTHON_OPENVINO_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_BENCHMARK_APP_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_OVC_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_OPENVINO_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# nodejs
unset(OV_CPACK_COMP_NPM_EXCLUDE_ALL)
# tools
set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# scripts
set(OV_CPACK_COMP_INSTALL_DEPENDENCIES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_SETUPVARS_EXCLUDE_ALL EXCLUDE_FROM_ALL)
endmacro()

ov_define_component_include_rules()

# New in version 3.18
set(CPACK_ARCHIVE_THREADS 8)
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/nsis.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE_EXCLUDE_ALL EXCLUDE_FROM_ALL)
unset(OV_CPACK_COMP_OPENVINO_REQ_FILES_EXCLUDE_ALL)
# nodejs
set(OV_CPACK_COMP_NPM_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# tools
unset(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL)
unset(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL)
Expand Down
4 changes: 4 additions & 0 deletions cmake/developer_package/packaging/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ macro(ov_define_component_names)
set(OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE "pyopenvino_package")
set(OV_CPACK_COMP_PYTHON_WHEELS "python_wheels")
set(OV_CPACK_COMP_OPENVINO_REQ_FILES "openvino_req_files")
# nodejs
set(OV_CPACK_COMP_NPM "ov_node_addon")
# tools
set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES "openvino_dev_req_files")
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER "deployment_manager")
Expand Down Expand Up @@ -178,6 +180,8 @@ elseif(CPACK_GENERATOR STREQUAL "RPM")
include(packaging/rpm/rpm)
elseif(CPACK_GENERATOR STREQUAL "NSIS")
include(packaging/nsis)
elseif(CPACK_GENERATOR STREQUAL "NPM")
include(packaging/npm)
elseif(CPACK_GENERATOR MATCHES "^(CONDA-FORGE|BREW|CONAN|VCPKG)$")
include(packaging/common-libraries)
elseif(CPACK_GENERATOR MATCHES "^(7Z|TBZ2|TGZ|TXZ|TZ|TZST|ZIP)$")
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/rpm/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ macro(ov_define_component_include_rules)
set(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# because numpy is installed by rpm
set(OV_CPACK_COMP_OPENVINO_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# nodejs
set(OV_CPACK_COMP_NPM_EXCLUDE_ALL EXCLUDE_FROM_ALL)
# tools
set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL)
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL EXCLUDE_FROM_ALL)
Expand Down
31 changes: 31 additions & 0 deletions cmake/packaging/npm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#

#
# OpenVINO NPM binaries, includes openvino:runtime, frontends, plugins, tbb
#
macro(ov_cpack_settings)
# fill a list of components which are part of conda
set(cpack_components_all ${CPACK_COMPONENTS_ALL})

unset(CPACK_COMPONENTS_ALL)
foreach(item IN LISTS cpack_components_all)
string(TOUPPER ${item} UPPER_COMP)

# filter out some components, which are not needed to be wrapped to npm package
if(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND
# because in case of VCPKG | CONAN | BREW | CONDA-FORGE distributions, python is either not needed or installed separately
vishniakov-nikolai marked this conversation as resolved.
Show resolved Hide resolved
(NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND
# skip all extra components, left only requirement libs, like tbb
NOT item STREQUAL "tbb_dev"
)
list(APPEND CPACK_COMPONENTS_ALL ${item})
endif()
endforeach()
unset(cpack_components_all)
list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL)

# override generator
set(CPACK_GENERATOR "TGZ")
endmacro()
2 changes: 2 additions & 0 deletions cmake/packaging/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

if(CPACK_GENERATOR STREQUAL "DEB")
include("${OpenVINO_SOURCE_DIR}/cmake/packaging/debian.cmake")
elseif(CPACK_GENERATOR STREQUAL "NPM")
include("${OpenVINO_SOURCE_DIR}/cmake/packaging/npm.cmake")
elseif(CPACK_GENERATOR STREQUAL "RPM")
include("${OpenVINO_SOURCE_DIR}/cmake/packaging/rpm.cmake")
elseif(CPACK_GENERATOR MATCHES "^(CONDA-FORGE|BREW|CONAN|VCPKG)$")
Expand Down
6 changes: 5 additions & 1 deletion src/bindings/js/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

project(OpenVINO_JS_API)

add_subdirectory(node)
ov_option(ENABLE_NODEJS "Enables OpenVINO Node.js API build" OFF)

if(ENABLE_JS)
add_subdirectory(node)
endif()
13 changes: 13 additions & 0 deletions src/bindings/js/node/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
build
include
lib
src
tests
thirdparty

.eslintrc.js
CMakeLists.txt
tsconfig.json

**/*.tsbuildinfo
*.tgz
74 changes: 73 additions & 1 deletion src/bindings/js/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,76 @@
# SPDX-License-Identifier: Apache-2.0
#

execute_process(COMMAND npm --prefix ${OpenVINO_SOURCE_DIR}/src/bindings/js/node install)
project(ov_node_addon)

set(CMAKE_CXX_STANDARD 17)
add_definitions(-DNAPI_VERSION=6)

include(FetchContent)

FetchContent_Declare(
node-api-headers
URL https://github.com/nodejs/node-api-headers/archive/refs/tags/v1.1.0.tar.gz
URL_HASH SHA256=70608bc1e6dddce280285f3462f18a106f687c0720a4b90893e1ecd86e5a8bbf
)
FetchContent_MakeAvailable(node-api-headers)

FetchContent_Declare(
node-addon-api
URL https://github.com/nodejs/node-addon-api/archive/refs/tags/v7.0.0.tar.gz
URL_HASH SHA256=e0cf2ef9bed9965ac8f498b4a7007b9f0002fa022c1ff665f256ab54260d6305
)
FetchContent_MakeAvailable(node-addon-api)

add_library(${PROJECT_NAME} SHARED
src/node_output.cpp
src/async_reader.cpp
src/preprocess/preprocess.cpp
src/preprocess/pre_post_process_wrap.cpp
src/preprocess/preprocess_steps.cpp
src/preprocess/input_info.cpp
src/preprocess/output_info.cpp
src/preprocess/input_tensor_info.cpp
src/preprocess/output_tensor_info.cpp
src/preprocess/input_model_info.cpp
src/preprocess/resize_algorithm.cpp
src/errors.cpp
src/helper.cpp
src/tensor.cpp
src/infer_request.cpp
src/compiled_model.cpp
src/core_wrap.cpp
src/model_wrap.cpp
src/addon.cpp
src/element_type.cpp
src/partial_shape_wrap.cpp
)

target_include_directories(${PROJECT_NAME} PRIVATE
"${node-api-headers_SOURCE_DIR}/include"
"${node-addon-api_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)

target_link_libraries(${PROJECT_NAME} PRIVATE openvino::runtime)

set_target_properties(${PROJECT_NAME} PROPERTIES
INSTALL_RPATH "$ORIGIN/"
PREFIX ""
SUFFIX ".node"
BUILD_WITH_INSTALL_RPATH TRUE
INSTALL_RPATH_USE_LINK_PATH FALSE
)

if (CPACK_GENERATOR STREQUAL "NPM")
set_target_properties(openvino PROPERTIES
INSTALL_RPATH "$ORIGIN/"
BUILD_WITH_INSTALL_RPATH TRUE
INSTALL_RPATH_USE_LINK_PATH FALSE
)
endif()

install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION . COMPONENT ${PROJECT_NAME} ${OV_CPACK_COMP_NPM_EXCLUDE_ALL}
vishniakov-nikolai marked this conversation as resolved.
Show resolved Hide resolved
RUNTIME DESTINATION . COMPONENT ${PROJECT_NAME} ${OV_CPACK_COMP_NPM_EXCLUDE_ALL}
vishniakov-nikolai marked this conversation as resolved.
Show resolved Hide resolved
)
15 changes: 12 additions & 3 deletions src/bindings/js/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@
- [src](./src/) - C++ sources for current API.
- [tests](./tests/) - tests directory for current API.

## Installation

- Run `npm install` from current directory
## Build

- Make sure that all submodules are updated `git submodule update --init --recursive`
- Build **openvino** with flag `-DENABLE_JS=ON`
- From build directory run `cmake -DCOMPONENT=ov_node_addon -DCMAKE_INSTALL_PREFIX=../src/bindings/js/node/bin/ -P cmake_install.cmake`
- Copy openvino shared libraries into `src/bindings/js/node/bin`:
`cp ../bin/intel64/Release/libopenvino_ir_frontend.so.2023.3.0 ../src/bindings/js/node/bin`
`cp ../bin/intel64/Release/libopenvino_ir_frontend.so.2330 ../src/bindings/js/node/bin`
`cp ../bin/intel64/Release/libopenvino.so.2330 ../src/bindings/js/node/bin`
`cp ../bin/intel64/Release/libopenvino.so.2023.3.0 ../src/bindings/js/node/bin`
- Now you can install dependencies packages `npm install`
- Run tests `npm run test` to make sure that **openvinojs-node** built successfully

## Usage

Expand Down
Loading
Loading