Ship the OpenVINO and WebGPU runtimes in every desktop package

The Windows installer and the Flatpak carried no ONNX Runtime, so they
ran every model on tract's one core; the Arch package left it to an
optional dependency. Each now installs two builds under runtimes/ —
Intel's OpenVINO build and the generic WebGPU one, both with the CPU
provider — fetched by tools/fetch-bundled-runtimes.sh from PyPI wheels
pinned by SHA-256, pruned to the native libraries (81 + 31 MB on Linux,
67 + 42 MB on Windows), licence texts beside them.

darkroom-desktop searches runtimes/openvino and runtimes/webgpu under
each place a package installs to; the engine opens all it finds and
keeps the one that fits the GPU, so a CUDA or ROCm runtime installed
beside them still wins on its vendor's card. On Windows the chosen
runtime's directory goes on PATH, because Intel's build leaves OpenVINO's
DLLs for the loader to find there.

The Windows image gains unzip; the installer smoke test checks both
runtimes landed.
This commit is contained in:
2026-10-04 21:00:15 -04:00
parent 2ced6f114f
commit cb97ebe7ac
9 changed files with 210 additions and 13 deletions
+13
View File
@@ -144,6 +144,19 @@ fn install_best(dirs: &[PathBuf]) -> Option<Runtime> {
std::env::set_var("ADSP_LIBRARY_PATH", dir);
}
// Windows looks for a provider's own dependencies — OpenVINO's DLLs,
// which Intel's build leaves beside it — on the DLL search path, not in
// the provider's directory. Intel's Python shim prepends to `PATH` for
// the same reason; so does this, before any provider loads.
#[cfg(target_os = "windows")]
if let Some(dir) = chosen.path.parent() {
let old = std::env::var_os("PATH").unwrap_or_default();
let dirs = std::iter::once(dir.to_path_buf()).chain(std::env::split_paths(&old));
if let Ok(path) = std::env::join_paths(dirs) {
std::env::set_var("PATH", path);
}
}
log::info!(
"inference: ONNX Runtime {} from {}",
chosen.version,