Skip to content

Commit 9db4b10

Browse files
authored
[nodejs] update Node.js binding document for 1.22 release (microsoft#24452)
### Description update Node.js binding document for 1.22 release ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
1 parent ef832b9 commit 9db4b10

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

js/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Please follow the steps described below to setup development environment.
2424

2525
### Prerequisites
2626

27-
- Node.js (16.0+): https://nodejs.org/ - (Optional) Use nvm ([Windows](https://github.com/coreybutler/nvm-windows) / [Mac/Linux](https://github.com/creationix/nvm)) to install Node.js
27+
- Node.js (20.0+): https://nodejs.org/ - (Optional) Use nvm ([Windows](https://github.com/coreybutler/nvm-windows) / [Mac/Linux](https://github.com/creationix/nvm)) to install Node.js
2828

29-
- Python (2.7 or 3.6+): https://www.python.org/downloads/
29+
- Python (3.9+): https://www.python.org/downloads/
3030

3131
- python should be added to the PATH environment variable
3232

@@ -72,7 +72,7 @@ This project is designed to include all "common" code, which are pure javascript
7272

7373
### Requirements
7474

75-
Node.js v12+ (recommended v14+)
75+
Node.js v20+
7676

7777
### Build
7878

@@ -108,15 +108,15 @@ Document will be generated in folder `<ORT_ROOT>/js/common/docs`.
108108

109109
> language: typescript/C++
110110
111-
> dependency: onnxruntime-common, ONNXRuntime.dll
111+
> dependency: onnxruntime-common, ONNXRuntime shared library(.so/dll/dylib)
112112
113113
> folder: <ORT_ROOT>/js/node
114114
115115
This project is designed to be used as a NPM package to enable Node.js users to consume ONNX Runtime via Node.js binding, in Node.js or any Node.js compatible environment.
116116

117117
### Requirements
118118

119-
Node.js v12+ (recommended v14+)
119+
Node.js v20+
120120

121121
### Build
122122

js/node/README.md

+19-14
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Install the latest stable version:
1010
npm install onnxruntime-node
1111
```
1212

13+
Install the nightly version:
14+
15+
```
16+
npm install onnxruntime-node@dev
17+
```
18+
1319
Refer to [ONNX Runtime JavaScript examples](https://github.com/microsoft/onnxruntime-inference-examples/tree/main/js) for samples and tutorials.
1420

1521
## Requirements
@@ -18,33 +24,32 @@ ONNXRuntime works on Node.js v16.x+ (recommend v20.x+) or Electron v15.x+ (recom
1824

1925
The following table lists the supported versions of ONNX Runtime Node.js binding provided with pre-built binaries.
2026

21-
| EPs/Platforms | Windows x64 | Windows arm64 | Linux x64 | Linux arm64 | MacOS x64 | MacOS arm64 |
22-
| ------------- | ----------- | ------------- | ----------------- | ----------- | --------- | ----------- |
23-
| CPU | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
24-
| DirectML | ✔️ | ✔️ |||||
25-
| CUDA ||| ✔️<sup>\[1]</sup> ||||
27+
| EPs/Platforms | Windows x64 | Windows arm64 | Linux x64 | Linux arm64 | MacOS x64 | MacOS arm64 |
28+
| ------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
29+
| CPU | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
30+
| WebGPU | ✔️ <sup>\[1]</sup> | ✔️ <sup>\[1]</sup> | ✔️ <sup>\[1]</sup> | ✔️ <sup>\[1]</sup> | ✔️ <sup>\[1]</sup> | ✔️ <sup>\[1]</sup> |
31+
| DirectML | ✔️ | ✔️ |||||
32+
| CUDA ||| ✔️<sup>\[2]</sup> ||||
33+
| CoreML ||||| ✔️ | ✔️ |
2634

27-
- \[1]: CUDA v11.8.
35+
- \[1]: WebGPU support is currently experimental.
36+
- \[2]: CUDA v12. See [CUDA EP Installation](#cuda-ep-installation) for details.
2837

2938
To use on platforms without pre-built binaries, you can build Node.js binding from source and consume it by `npm install <onnxruntime_repo_root>/js/node/`. See also [instructions](https://onnxruntime.ai/docs/build/inferencing.html#apis-and-language-bindings) for building ONNX Runtime Node.js binding locally.
3039

3140
# GPU Support
3241

33-
Right now, the Windows version supports only the DML provider. Linux x64 can use CUDA and TensorRT.
42+
Right now, the Windows version supports WebGPU execution provider and DML execution provider. Linux x64 can use CUDA and TensorRT.
3443

3544
## CUDA EP Installation
3645

37-
To use CUDA EP, you need to install the CUDA EP binaries. By default, the CUDA EP binaries are installed automatically when you install the package. If you want to skip the installation, you can pass the `--onnxruntime-node-install-cuda=skip` flag to the installation command.
46+
To use CUDA EP, you need to install the CUDA EP binaries. By default, the CUDA EP binaries are installed automatically when you install the package. If you want to skip the installation, you can pass the `--onnxruntime-node-install=skip` flag to the installation command.
3847

3948
```
40-
npm install onnxruntime-node --onnxruntime-node-install-cuda=skip
49+
npm install onnxruntime-node --onnxruntime-node-install=skip
4150
```
4251

43-
You can also use this flag to specify the version of the CUDA: (v11 or v12)
44-
45-
```
46-
npm install onnxruntime-node --onnxruntime-node-install-cuda=v12
47-
```
52+
~~You can also use this flag to specify the version of the CUDA: (v11 or v12)~~ CUDA v11 is no longer supported since v1.22.
4853

4954
## License
5055

0 commit comments

Comments
 (0)