title | parent | grand_parent | has_children | nav_order |
---|---|---|---|---|
Node.js binding |
JavaScript |
Get Started |
false |
2 |
{: .no_toc }
- TOC placeholder {:toc}
# install latest release version
npm install onnxruntime-node
// use ES6 style import syntax (recommended)
import * as ort from 'onnxruntime-node';
// or use CommonJS style import syntax
const ort = require('onnxruntime-node');
- Follow the Quick Start instructions for ONNX Runtime Node.js binding.
The following table lists the supported versions of ONNX Runtime Node.js binding provided with pre-built binaries.
EPs/Platforms | Windows x64 | Windows arm64 | Linux x64 | Linux arm64 | MacOS x64 | MacOS arm64 |
---|---|---|---|---|---|---|
CPU | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
DirectML | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ |
CUDA | ❌ | ❌ | ✔️[1] | ❌ | ❌ | ❌ |
- [1]: CUDA v11.8.
For platforms not on the list or want a custom build, you can build Node.js binding from source and consume using npm install <onnxruntime_repo_root>/js/node/
.