-
-
Couldn't load subscription status.
- Fork 169
Description
Hi,
Right now I'm working on porting a Python service that uses silero-vad and sherpa-onnx to Rust. For model inference in the Rust version of the application, I’m using:
Example of how the libraries are included:
sherpa-rs = { version = "0.6.6", features = ["sys", "download-binaries" ] }
ort = { version = "=2.0.0-rc.9", features = ["ndarray", "cuda", "load-dynamic", "download-binaries"] }
At the moment, I’ve run into an issue that could be described as “shared library hell,” as mentioned in the documentation:
-
sherpa-rscopies its own version oflibonnxruntime.dylib(version 1.17) into target/debug. -
ortapparently detects thatlibonnxruntime.dylibis already loaded and doesn’t try to load its own. -
At runtime, when I call the
ortAPI, I get the error:"The requested API version [20] is not available, only API versions [1, 17] are supported in this build".
This brings me to a couple of questions:
-
Where does
ortgetlibonnxruntime.dylibfrom, and why doesn’t it appear intarget/debugeven when I’m only usingort?
My current hypothesis is thatortlooks it up from somewhere in the cache:
/Library/Caches/ort.pyke.io/dfbin/x86_64-apple-darwin/{hash}/onnxruntime/lib/libonnxruntime.a. -
What is the recommended way to configure
ortin my case?
So far, it seems like I need to manually download a matching ONNX Runtime distribution and specify its path usingORT_DYLIB_PATH.
Thanks