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

[JS OV] Node.js API #19848

Merged
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
741 commits
Select commit Hold shift + click to select a range
8a3799f
Add tests
almilosz Oct 12, 2023
7798b78
Remove Output setNames and addNames
almilosz Oct 13, 2023
8ae7d96
Add Model.input()
almilosz Oct 13, 2023
98e6368
Merge pull request #54 from almilosz/update-output
almilosz Oct 13, 2023
b10326e
Merge branch 'js-wasm-proto' of https://github.com/vishniakov-nikolai…
almilosz Oct 13, 2023
7457631
Add config param to compileModelSync()
almilosz Oct 13, 2023
7292401
Support ompileModel(model_path, device, config)
almilosz Oct 13, 2023
fe78ac2
Add compile_model(model_path. device)
almilosz Oct 13, 2023
c26d096
Add unit tests
almilosz Oct 13, 2023
c4de7c7
Add compileModel(model_path, device, config) async
almilosz Oct 13, 2023
a673b51
Add tests
almilosz Oct 13, 2023
a40ebef
Merge pull request #55 from almilosz/outputs-inputs
almilosz Oct 23, 2023
73846f3
Merge branch 'js-wasm-proto' of https://github.com/vishniakov-nikolai…
almilosz Oct 23, 2023
93147f9
Add reference to keys
almilosz Oct 23, 2023
15a2ec3
Make unused parameter unamed
almilosz Oct 23, 2023
b13c854
Make unused parameters unnamed
almilosz Oct 23, 2023
0417316
Remove tensor copy from callback
almilosz Oct 23, 2023
b6bebfe
Rename TsfnContext data to context
almilosz Oct 23, 2023
335b60d
Fix naming
almilosz Oct 23, 2023
104838c
fix naming
almilosz Oct 23, 2023
d8724cf
correct mac version detection
akashchi Oct 23, 2023
f2f1f53
correct var
akashchi Oct 23, 2023
91d913c
use strs
akashchi Oct 23, 2023
628a32b
add comment about mapping
akashchi Oct 24, 2023
1cafbef
Fix condition and add tests
almilosz Oct 24, 2023
8ffa2d4
Make compile_model_sync protected and rename
almilosz Oct 24, 2023
7c977df
Update addon.ts
almilosz Oct 24, 2023
5888e07
Update src/bindings/js/node/tests/basic.test.js
almilosz Oct 24, 2023
10543d5
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Oct 24, 2023
2229e75
Merge branch 'master' into feature/read-from-buffer
vishniakov-nikolai Oct 24, 2023
b638943
Merge pull request #56 from almilosz/almilosz/js-api
almilosz Oct 26, 2023
0d26db1
Add const references
almilosz Oct 26, 2023
894a4a9
Implement Buffer reading
vishniakov-nikolai Oct 26, 2023
4c5805a
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Oct 26, 2023
df5f9be
Merge pull request #57 from akashchi/bug/correct-mac-detection
vishniakov-nikolai Oct 26, 2023
a3348fe
Merge branch 'js-wasm-proto' into feature/read-from-buffer
vishniakov-nikolai Oct 26, 2023
18b78d0
Fix Core type definition
vishniakov-nikolai Oct 26, 2023
a82b596
Make download runtime script reusable for import
yatarkan Oct 26, 2023
ffb140a
Add input().tensor() methods
almilosz Oct 27, 2023
d06de68
Merge branch 'js-wasm-proto' into generic-download-runtime
yatarkan Oct 27, 2023
5476ed2
Add set_shape()
almilosz Oct 27, 2023
97b7c48
Add InputModelInfo class
almilosz Oct 27, 2023
0f40de8
Add PreProcessSteps() class
almilosz Oct 30, 2023
7283596
Update package-lock
almilosz Oct 30, 2023
a9dcf2d
Update hello_classification sample
almilosz Oct 30, 2023
bd9b326
Update classification_async sample
almilosz Oct 30, 2023
d737561
Merge pull request #58 from yatarkan/generic-download-runtime
vishniakov-nikolai Oct 30, 2023
ffcc426
Update hello_reshape sample
almilosz Oct 30, 2023
81e3835
Update input() and query-answering notebook
almilosz Oct 30, 2023
b64546d
Move PrePostProcess class
almilosz Oct 30, 2023
9516885
Remove unaligned methods
almilosz Oct 30, 2023
50544fb
Remove preprocess_info.cpp
almilosz Oct 30, 2023
1aefdab
Add tests
almilosz Oct 30, 2023
45f0f7a
Add preprocess_steps_wrap.cpp
almilosz Oct 30, 2023
ab43beb
Move PreProcessSteps implementation
almilosz Oct 30, 2023
35b0ce4
Rename preprocess_step_wrap.cpp
almilosz Oct 30, 2023
293e914
Move preprocess_steps.cpp to preprocess/
almilosz Oct 30, 2023
9d99746
Add support of reading model from Buffer to read_model_sync function
vishniakov-nikolai Oct 30, 2023
66e9d95
Remove outdated defs
vishniakov-nikolai Oct 30, 2023
dc1caa9
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Oct 30, 2023
cb41ec5
Update allowed licenses list
vishniakov-nikolai Oct 30, 2023
ff855d1
Merge pull request #60 from vishniakov-nikolai/feature/extend-licenses
vishniakov-nikolai Oct 31, 2023
6ac8b5c
Extract params parsing to structure
vishniakov-nikolai Oct 31, 2023
2fbf253
Rename variable
almilosz Oct 31, 2023
e17023c
Reuse read model parameters parser for async
vishniakov-nikolai Oct 31, 2023
4ae16e2
Update type definition
vishniakov-nikolai Oct 31, 2023
d7481c0
Update src/bindings/js/node/lib/addon.ts
almilosz Nov 2, 2023
15debed
Merge pull request #52 from almilosz/almilosz/infer-async
almilosz Nov 2, 2023
aa6af55
Add std::guard_lock
almilosz Nov 2, 2023
14b57f2
Add unnamed namespace
almilosz Nov 2, 2023
6095173
Fix typo in tests
almilosz Nov 2, 2023
15ab34b
Use 0 as default
almilosz Nov 2, 2023
9d1263d
Fix code style
almilosz Nov 2, 2023
c41f4af
Fix code style
almilosz Nov 2, 2023
038be0b
Update read model method description
vishniakov-nikolai Nov 2, 2023
65149b0
Fix condition
almilosz Nov 2, 2023
30e7b54
Fix variable name
vishniakov-nikolai Nov 2, 2023
e55e0e4
Remove read from buffer notebook
vishniakov-nikolai Nov 2, 2023
8f9ab5b
Delete args after usage
vishniakov-nikolai Nov 2, 2023
018d804
Add definitions to addon.ts
almilosz Nov 2, 2023
579ab9d
Remove Inits from addon.cpp
almilosz Nov 2, 2023
b70f189
Merge branch 'js-wasm-proto' into almilosz/pre-post-process
almilosz Nov 2, 2023
7159ff5
Extend getModelPath helper
vishniakov-nikolai Nov 2, 2023
229c3fd
Add tests for readModel
vishniakov-nikolai Nov 2, 2023
ecab093
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Nov 2, 2023
5298b54
Merge branch 'js-wasm-proto' into feature/read-from-buffer
vishniakov-nikolai Nov 2, 2023
9906364
Merge pull request #61 from almilosz/almilosz/infer-async
almilosz Nov 3, 2023
358a9ea
Rename infer() to inferSync()
almilosz Nov 3, 2023
b410177
Rename inferAsync() to infer()
almilosz Nov 3, 2023
582736e
Add more desciptive names for cpp methods
almilosz Nov 3, 2023
20cb0f7
Merge pull request #53 from vishniakov-nikolai/feature/read-from-buffer
vishniakov-nikolai Nov 3, 2023
224d17a
Merge pull request #62 from almilosz/almilosz/infer-async
almilosz Nov 6, 2023
24d9e73
Add type elementTypeString
almilosz Nov 6, 2023
5050300
Merge branch 'almilosz/pre-post-process' of https://github.com/almilo…
almilosz Nov 6, 2023
48a8729
Update setShape definiton
almilosz Nov 6, 2023
9d36db3
Merge branch 'js-wasm-proto' of https://github.com/vishniakov-nikolai…
almilosz Nov 6, 2023
fa8ed69
Fix code style
almilosz Nov 6, 2023
0297267
Merge pull request #59 from almilosz/almilosz/pre-post-process
almilosz Nov 6, 2023
d3ea6c3
Add output().tensor()
almilosz Nov 7, 2023
f8364e4
Add definitions to addon.ts
almilosz Nov 7, 2023
8880c47
Define output() in PrePostProcessorWrap
almilosz Nov 7, 2023
bbf1d14
Add a new file and tests for PrePostProcessor
almilosz Nov 7, 2023
a48b616
Update samples
almilosz Nov 7, 2023
0e5437c
Add PartialShape class
vishniakov-nikolai Nov 8, 2023
a340cd2
Add types definition
vishniakov-nikolai Nov 8, 2023
3502825
Add tests
vishniakov-nikolai Nov 8, 2023
f7ccd18
Fix include
vishniakov-nikolai Nov 8, 2023
a75f0c8
Add small changes
almilosz Nov 9, 2023
01727b4
Merge pull request #63 from almilosz/almilosz/pre-post-process
almilosz Nov 9, 2023
e5637b2
Rename getPrecision() to getElementType()
almilosz Nov 13, 2023
2a83b5c
Revert "Rename infer() to inferSync()"
almilosz Nov 14, 2023
0db9588
Extend dynamicShape class by isDynamic, toStrings methods
vishniakov-nikolai Nov 14, 2023
60a5d71
Add Dimension type to get partial shape content
vishniakov-nikolai Nov 15, 2023
e111368
Return PartialShape object from getPartialShape Output method
vishniakov-nikolai Nov 15, 2023
4977d4c
Add tests for PartialShape class
vishniakov-nikolai Nov 15, 2023
c1ce430
Merge pull request #66 from almilosz/revert-renaming-inferAsync
almilosz Nov 15, 2023
e15aa88
Merge pull request #64 from vishniakov-nikolai/feature/partial-shape
vishniakov-nikolai Nov 17, 2023
72c5ecf
Merge pull request #65 from almilosz/almilosz/names-refactor
almilosz Nov 21, 2023
d3aba51
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Nov 21, 2023
03cd77f
Move PrePostProcessor class into preprocess property
vishniakov-nikolai Nov 21, 2023
aa585bb
Fix tests
vishniakov-nikolai Nov 21, 2023
e1d16c2
Move resize algorithm into preprocess dir
vishniakov-nikolai Nov 21, 2023
8cae516
Update samples
vishniakov-nikolai Nov 21, 2023
0f5dcce
Rollback notebook
vishniakov-nikolai Nov 21, 2023
136d7e3
Remove unnecessary inheritance
vishniakov-nikolai Nov 23, 2023
5626d4d
Naming refactoring
vishniakov-nikolai Nov 23, 2023
aeda859
Element type initialization refactoring
vishniakov-nikolai Nov 23, 2023
b7d4f10
Add copyright to preprocess/preprocess.cpp
vishniakov-nikolai Nov 24, 2023
0907720
Remove unnecessary include
vishniakov-nikolai Nov 24, 2023
4d209c8
Merge pull request #67 from vishniakov-nikolai/fix/prepostprocessor-t…
vishniakov-nikolai Nov 27, 2023
15893c7
Merge pull request #69 from vishniakov-nikolai/fix/element-type-names…
vishniakov-nikolai Nov 27, 2023
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
80f444b
Move SetInstaceData to addon.cpp
almilosz Nov 28, 2023
219c438
Remove SetInstanceData from node_output.cpp
almilosz Nov 28, 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
ec74520
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Nov 30, 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
436978b
Merge branch 'master' into js-wasm-proto
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
6559528
Remove AddonData ctor
almilosz Dec 7, 2023
18fe98d
Extend config
vishniakov-nikolai Dec 7, 2023
02d7038
Update Init
almilosz Dec 8, 2023
d4ed9db
Add const to ModelWrap ptr
almilosz Dec 8, 2023
f7c6b50
Update Inits
almilosz Dec 8, 2023
be31e37
Add model_prototype check
almilosz Dec 8, 2023
145d850
Assert prototype is valid ptr
almilosz Dec 8, 2023
99d2570
Added more exclude markers for install rules
ilya-lavrenov Dec 8, 2023
e4c20a7
Add class prototypes
almilosz Dec 11, 2023
eea8bed
Merge branch 'cmake-install-rules' into feature/extend-cpack
vishniakov-nikolai Dec 11, 2023
6802863
Expose ConstOutput
almilosz Dec 11, 2023
c521b23
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 11, 2023
0ca0fb4
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai Dec 11, 2023
077116d
Modify Wrap methods
almilosz Dec 11, 2023
f96ca66
Update tests
almilosz Dec 11, 2023
69ebfd9
Update package config
vishniakov-nikolai Dec 11, 2023
4663a7b
Merge pull request #71 from almilosz/almilosz/wrapped_objects
almilosz Dec 12, 2023
07e4e8a
Merge branch 'js-wasm-proto' of https://github.com/vishniakov-nikolai…
almilosz Dec 12, 2023
2d75329
Rename data
almilosz Dec 12, 2023
e22368b
Merge pull request #74 from almilosz/almilosz/object-prototypes
almilosz Dec 12, 2023
14aff32
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 12, 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
b6535e9
Merge branch 'master' into js-wasm-proto
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
8e95a85
Use std::array
almilosz 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
ea633e5
Change include type for openvino headers & run clang
almilosz Dec 13, 2023
fc7387d
Merge branch 'master' into js-wasm-proto
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
182c826
Add docs comments
almilosz 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
3004bd0
Add model to initializer list
almilosz Dec 14, 2023
7ca2c43
Add check for nullptr
almilosz Dec 14, 2023
227e384
Use OPENVINO_THROW
almilosz Dec 14, 2023
8bf0916
Avoid default initialization
almilosz Dec 14, 2023
78ec5d8
Add try-catch
almilosz Dec 14, 2023
df3ad82
Remove Napi::Env
almilosz Dec 14, 2023
8f3111e
Add consts
almilosz Dec 14, 2023
5cc7dd9
Initialize members of classes
almilosz Dec 14, 2023
c4007cd
Add else
almilosz Dec 14, 2023
4d9b7d5
Remove set and get partial_shape
almilosz Dec 14, 2023
1350920
Refactor PartialShapeWrap ctor
almilosz Dec 14, 2023
5cb1673
Specify README build instructions
vishniakov-nikolai Dec 14, 2023
9c27547
Mark functions as const
almilosz Dec 14, 2023
2e289b5
Add override specifier
almilosz Dec 15, 2023
4625cff
Rename Wrap to wrap
almilosz Dec 15, 2023
9483a52
Rename Init and GetClassConstructor to snake_case
almilosz Dec 15, 2023
cbfcbab
Merge pull request #75 from almilosz/almilosz/js-api
almilosz Dec 15, 2023
9381acd
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 15, 2023
0f53d72
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai Dec 15, 2023
8ed016e
Change args init, add OPENVINO_ASSERT
almilosz Dec 15, 2023
c5b4d72
Merge pull request #76 from almilosz/almilosz/js-api
almilosz Dec 15, 2023
7a57b12
Merge pull request #73 from vishniakov-nikolai/feature/extend-cpack
vishniakov-nikolai Dec 15, 2023
5f74a8c
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 18, 2023
59d5596
Review remarks fixes
vishniakov-nikolai Dec 18, 2023
24c2ebb
Remove extra structure in samples
vishniakov-nikolai Dec 18, 2023
f1918da
Merge pull request #77 from vishniakov-nikolai/fix/codestyles-remarks
vishniakov-nikolai Dec 18, 2023
06784af
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 18, 2023
ff63e89
Remove extra loader path assignment
vishniakov-nikolai Dec 18, 2023
b2bcc73
Fix review remarks
vishniakov-nikolai Dec 18, 2023
bbc52f0
Fix offset
vishniakov-nikolai Dec 18, 2023
6c06614
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 18, 2023
1b69f53
Remove extra brackets
vishniakov-nikolai Dec 18, 2023
7d3a480
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 18, 2023
72ebcfb
Fix headers
vishniakov-nikolai Dec 18, 2023
2a0c91b
Fix headers
vishniakov-nikolai Dec 18, 2023
43ed1b3
Add no missing declaration flag
vishniakov-nikolai Dec 18, 2023
4d3058f
Move structure definition to headers
vishniakov-nikolai Dec 18, 2023
ead5e56
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 18, 2023
b66bd94
Disable js bindings win compilation
vishniakov-nikolai Dec 18, 2023
0ae515c
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 18, 2023
9bc5c9b
Add ignore unresolved symbols option
vishniakov-nikolai Dec 18, 2023
da1f041
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 18, 2023
22c6551
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 19, 2023
59e7a12
Revert AARCH64
vishniakov-nikolai Dec 19, 2023
cceee4d
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 19, 2023
4fea6ba
Add specific into CMakeLists
vishniakov-nikolai Dec 19, 2023
aa442d3
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 19, 2023
7da2ac8
Fix cmake config
vishniakov-nikolai Dec 19, 2023
c422f65
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 19, 2023
18e228d
Fix aarch64 condition
vishniakov-nikolai Dec 19, 2023
9c5bb1d
Fix compiler version condition
vishniakov-nikolai Dec 19, 2023
f29c376
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 19, 2023
c1678d7
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 19, 2023
4b89752
Merge branch 'master' into js-wasm-proto
vishniakov-nikolai Dec 19, 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
5 changes: 5 additions & 0 deletions .github/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ allow-licenses:
- 'BSD-2-Clause AND BSD-3-Clause'
- 'MIT'
- 'Apache-2.0'
- 'ISC'
- 'Apache-2.0 AND MIT'
- 'BlueOak-1.0.0'
- '0BSD'
- 'Python-2.0'
ilya-lavrenov marked this conversation as resolved.
Show resolved Hide resolved
fail-on-scopes:
- 'runtime'
- 'development'
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/packaging/archive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,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 @@ -101,6 +101,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 @@ -106,6 +106,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
105 changes: 105 additions & 0 deletions cmake/developer_package/packaging/npm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#

include(GNUInstallDirs)

# We have to specify RPATH, all runtime libs are in one dir
set(CMAKE_SKIP_INSTALL_RPATH OFF)

#
# ov_npm_cpack_set_dirs()
#
# Set directories for cpack
#
macro(ov_npm_cpack_set_dirs)
set(OV_CPACK_INCLUDEDIR .)
set(OV_CPACK_IE_CMAKEDIR .)
set(OV_CPACK_NGRAPH_CMAKEDIR .)
set(OV_CPACK_OPENVINO_CMAKEDIR .)
set(OV_CPACK_DOCDIR .)
set(OV_CPACK_LICENSESDIR .)
set(OV_CPACK_SAMPLESDIR .)
set(OV_CPACK_WHEELSDIR .)
set(OV_CPACK_TOOLSDIR .)
set(OV_CPACK_DEVREQDIR .)
set(OV_CPACK_PYTHONDIR .)

if(WIN32)
set(OV_CPACK_LIBRARYDIR .)
set(OV_CPACK_RUNTIMEDIR .)
set(OV_CPACK_ARCHIVEDIR .)
elseif(APPLE)
set(OV_CPACK_LIBRARYDIR .)
set(OV_CPACK_RUNTIMEDIR .)
set(OV_CPACK_ARCHIVEDIR .)
else()
set(OV_CPACK_LIBRARYDIR .)
set(OV_CPACK_RUNTIMEDIR .)
set(OV_CPACK_ARCHIVEDIR .)
endif()

set(OV_CPACK_LIBRARYDIR .)
set(OV_CPACK_ARCHIVEDIR .)
set(OV_CPACK_PLUGINSDIR .)
set(OV_CPACK_IE_CMAKEDIR .)
set(OV_CPACK_NGRAPH_CMAKEDIR .)
set(OV_CPACK_OPENVINO_CMAKEDIR .)
set(OV_CPACK_DOCDIR .)
set(OV_CPACK_LICENSESDIR licenses)
set(OV_CPACK_PYTHONDIR .)

# non-native stuff
set(OV_CPACK_SHAREDIR .)
set(OV_CPACK_SAMPLESDIR .)
set(OV_CPACK_DEVREQDIR .)
unset(OV_CPACK_SHAREDIR)

# skipped during debian packaging
set(OV_CPACK_WHEELSDIR .)
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)
# tbb
unset(OV_CPACK_COMP_TBB_EXCLUDE_ALL)
set(OV_CPACK_COMP_TBB_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 @@ -117,6 +117,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
12 changes: 11 additions & 1 deletion cmake/developer_package/packaging/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ endmacro()
#
function(ov_set_install_rpath TARGET_NAME lib_install_path)
if(APPLE AND CPACK_GENERATOR MATCHES "^(7Z|TBZ2|TGZ|TXZ|TZ|TZST|ZIP)$" OR CPACK_GENERATOR STREQUAL "NPM")
if (APPLE)
set(RPATH_PREFIX "@loader_path/${dependency_rpath}")
vishniakov-nikolai marked this conversation as resolved.
Show resolved Hide resolved
else()
set(RPATH_PREFIX "$ORIGIN")
endif()

unset(rpath_list)
foreach(dependency_install_path IN LISTS ARGN)
file(RELATIVE_PATH dependency_rpath "/${lib_install_path}" "/${dependency_install_path}")
set(dependency_rpath "@loader_path/${dependency_rpath}")
set(dependency_rpath "${RPATH_PREFIX}/${dependency_rpath}")
list(APPEND rpath_list "${dependency_rpath}")
endforeach()

Expand Down Expand Up @@ -139,6 +145,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 @@ -179,6 +187,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 @@ -97,6 +97,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
# python is not required for NPM package
(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"
vishniakov-nikolai marked this conversation as resolved.
Show resolved Hide resolved
)
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
1 change: 1 addition & 0 deletions samples/js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/assets
15 changes: 15 additions & 0 deletions samples/js/node/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
parserOptions: {
ecmaVersion: 'latest'
},
env: {
node: true,
es6: true,
},
extends: [
'eslint:recommended',
'../../../src/bindings/js/.eslintrc-global.js',
],
ignorePatterns: ['node_modules/', '.eslintrc.js'],
root: true,
};
1 change: 1 addition & 0 deletions samples/js/node/.gitignore
almilosz marked this conversation as resolved.
Show resolved Hide resolved
almilosz marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
26 changes: 26 additions & 0 deletions samples/js/node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# OpenVINO™ JavaScript API examples of usage

## Installation of openvinojs-node package
From *openvino/src/bindings/js/node* run `npm i` to download OpenVINO™ runtime, install requirements, build bindings and compile TypeScript code to JavaScript

On the *.nix systems run `source openvino/src/bindings/js/node/scripts/setupvars.sh` to add path to OpenVINO™ runtime libraries in `LD_LIBRARY_PATH` variable

Note: Perform these steps also before running notebooks.

## Samples
- hello_classification
- hello_reshape_ssd
- classification_sample_async

## Notebooks

Use [Node.js Notebooks (REPL)](https://marketplace.visualstudio.com/items?itemName=donjayamanne.typescript-notebook)
VSCode extension to run these notebook samples

Make sure that `LD_LIBRARY_PATH` variable contains path to OpenVINO runtime folder

- ./notebooks
- 001-hello-world.nnb
- 003-hello-segmentation.nnb
- 004-hello-detection.nnb
- 213-question-answering.nnb
8 changes: 8 additions & 0 deletions samples/js/node/classification_sample_async/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Image Classification Async NodeJS Sample

Models with only 1 input and output are supported.

Run:
`node classification_sample_async.js -m *path_to_model_file* -i *path_to_img1* -i *path_to_img2* -d AUTO`

Other details see in /samples/python/classification_sample_async/README.md
Loading
Loading