Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
onnxruntime-node
Advanced tools
ONNX Runtime Node.js binding enables Node.js applications to run ONNX model inference.
Install the latest stable version:
npm install onnxruntime-node
Refer to ONNX Runtime JavaScript examples for samples and tutorials.
ONNXRuntime works on Node.js v16.x+ (recommend v18.x+) or Electron v15.x+ (recommend v28.x+).
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] | ❌ | ❌ | ❌ |
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 for building ONNX Runtime Node.js binding locally.
Right now, the Windows version supports only the DML provider. Linux x64 can use CUDA and TensorRT.
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.
npm install onnxruntime-node --onnxruntime-node-install-cuda=skip
You can also use this flag to specify the version of the CUDA: (v11 or v12)
npm install onnxruntime-node --onnxruntime-node-install-cuda=v12
License information can be found here.
FAQs
ONNXRuntime Node.js binding
The npm package onnxruntime-node receives a total of 68,242 weekly downloads. As such, onnxruntime-node popularity was classified as popular.
We found that onnxruntime-node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.