microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
ci_build/onnxruntime_integration/build_with_onnxruntime.sh
33lines · modecode
| 1 | #!/bin/bash |
| 2 | |
| 3 | BASE_DIR=onnxruntime_customops_integration |
| 4 | |
| 5 | if [ ! -d $BASE_DIR ] |
| 6 | then |
| 7 | mkdir $BASE_DIR |
| 8 | fi |
| 9 | cd $BASE_DIR |
| 10 | |
| 11 | git clone https://github.com/microsoft/onnxruntime.git |
| 12 | cd onnxruntime |
| 13 | |
| 14 | # there is no stable version including webassembly |
| 15 | git checkout e6a3308db7c03a13e0f08b221b6770e17fc3a4ef |
| 16 | cd cmake/external |
| 17 | git clone git@github.com:microsoft/onnxruntime-extensions.git |
| 18 | |
| 19 | cd ../.. |
| 20 | |
| 21 | cp cmake/external/onnxruntime-extensions/test/data/custom_op_negpos.onnx onnxruntime/test/testdata |
| 22 | cp cmake/external/onnxruntime-extensions/test/data/custom_op_string_lower.onnx onnxruntime/test/testdata |
| 23 | git apply cmake/external/onnxruntime-extensions/ci_build/onnxruntime_integration/onnxruntime_v1.8.patch |
| 24 | |
| 25 | #get ready and begin building |
| 26 | cd .. |
| 27 | if [ ! -d build ] |
| 28 | then |
| 29 | mkdir build |
| 30 | fi |
| 31 | python3 onnxruntime/tools/ci_build/build.py --build_dir build "$@" |
| 32 | |
| 33 | |
| 34 | |