mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-19 19:00:47 +00:00
[docs/web] update build instructions for web (#11307)
This commit is contained in:
parent
7144892eaa
commit
7b36e8d4ed
1 changed files with 17 additions and 3 deletions
20
docs/build/web.md
vendored
20
docs/build/web.md
vendored
|
|
@ -32,13 +32,27 @@ There are 2 steps to build ONNX Runtime Web:
|
|||
```
|
||||
- [Install](https://cmake.org/download/) cmake-3.18 or higher.
|
||||
|
||||
- [Install](https://nodejs.org/) Node.js (14.0+)
|
||||
- [Install](https://nodejs.org/) Node.js (16.0+)
|
||||
|
||||
- (Optional) Use nvm ([Windows](https://github.com/coreybutler/nvm-windows) / [Mac/Linux](https://github.com/creationix/nvm)) to install Node.js
|
||||
|
||||
- Python (2.7 or 3.6+): https://www.python.org/downloads/
|
||||
- Python (3.8+): https://www.python.org/downloads/
|
||||
- python should be added to the PATH environment variable
|
||||
|
||||
- Prepare emsdk:
|
||||
emsdk should be automatically installed at `<ORT_ROOT>/cmake/external/emsdk/emsdk`. If the folder structure does not exist, run the following commands in `<ORT_ROOT>/` to install git submodules:
|
||||
```sh
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
(If you are using Windows, you can skip this step) in `<ORT_ROOT>/cmake/external/emsdk/`, run the following commands to setup emsdk:
|
||||
```sh
|
||||
./emsdk install latest
|
||||
./emsdk activate latest
|
||||
source ./emsdk_env.sh
|
||||
```
|
||||
|
||||
### Build Instructions
|
||||
|
||||
in `<ORT_ROOT>/`, run one of the following commands to build WebAssembly:
|
||||
|
|
@ -103,7 +117,7 @@ Q: I have a C++ project for web scenario, which runs a ML model using ONNX Runti
|
|||
|
||||
### Prerequisites
|
||||
|
||||
- [Install](https://nodejs.org/) Node.js (14.0+)
|
||||
- [Install](https://nodejs.org/) Node.js (16.0+)
|
||||
|
||||
- (Optional) Use nvm ([Windows](https://github.com/coreybutler/nvm-windows)/[Mac/Linux](https://github.com/creationix/nvm)) to install Node.js
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue