Created
May 23, 2023 21:20
-
-
Save fdwr/54907a701312f0b9c9f87c6bbbd714f6 to your computer and use it in GitHub Desktop.
Build ORT for the Web on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Adapted from Linux: https://gist.github.com/guschmue/ed7b2eeae60ee91342f3667c0fb3e76b | |
:: cd to the root of your repo for https://github.com/microsoft/onnxruntime. | |
:: Ensure Python.exe and Npm are on your path. | |
setlocal | |
:: Build with SIMD enabled. | |
call ./build.bat --config RelWithDebInfo --parallel --skip_submodule_sync --skip_tests --parallel --build_wasm --enable_wasm_simd --use_webnn --target onnxruntime_webassembly | |
:: one time (or whenever js files changed) | |
cd js | |
call npm ci | |
cd common | |
call npm ci | |
cd ../web | |
call npm ci | |
:: you are in js/web | |
:: very first time only | |
npm run pull:wasm | |
set bld=../../build/Windows/RelWithDebInfo | |
copy %bld%/ort-wasm-simd.js lib/wasm/binding/ort-wasm.js | |
copy %bld%/ort-wasm-simd.wasm dist/ | |
copy %bld%/ort-wasm-simd.wasm.map dist/ | |
call npm run build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment