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 -6
View File
@@ -15,14 +15,17 @@ license=('GPL-3.0-or-later')
# Runtime: Vulkan for wgpu, and a Secret Service implementation for the
# Nextcloud credentials (FR-NC-2) — gnome-keyring or kwallet both provide it.
depends=('vulkan-icd-loader' 'fontconfig' 'libxkbcommon')
makedepends=('cargo' 'git')
# ONNX Runtime is loaded from /usr/lib at launch if a package put it there
# (docs/inference.md §3): the CPU build is 8–10× the built-in tract, the
# ROCm build adds the MIGraphX rung on an AMD GPU. Neither is required.
makedepends=('cargo' 'git' 'curl' 'unzip')
# Two ONNX Runtime builds ship in /usr/lib/darkroom/runtimes — Intel's
# OpenVINO build and the generic WebGPU one, both 8–10× the built-in tract
# on the CPU alone — and the app opens every runtime it finds and keeps the
# one that fits the GPU (docs/dev/inference.md §3.2). The ROCm build in
# /usr/lib adds the MIGraphX rung on an AMD GPU and outranks both there;
# Intel's OpenCL driver is what lets OpenVINO reach an Intel GPU.
optdepends=('gnome-keyring: store Nextcloud credentials'
'kwallet: store Nextcloud credentials'
'onnxruntime-cpu: run the neural models on every core'
'onnxruntime-rocm: run the neural models on an AMD GPU')
'onnxruntime-rocm: run the neural models on an AMD GPU'
'intel-compute-runtime: run the neural models on an Intel GPU')
options=('!lto') # the workspace sets its own LTO in Cargo.toml
_repo="$(cd "${startdir}/.." && pwd)"
@@ -59,6 +62,10 @@ package() {
install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
# The bundled runtimes, where darkroom-desktop's search finds them
# (`runtimes/` under /usr/lib/darkroom). Pinned wheels, checked by hash.
./tools/fetch-bundled-runtimes.sh linux "${pkgdir}/usr/lib/darkroom/runtimes"
# The manual: the rendered page and its pictures, where the app's Help
# opens it (dr_ui::manual, through dr_plat::system_data_dirs). Offline by
# design — the help sheet's "See it" links land here, on a machine that
@@ -185,6 +185,15 @@ modules:
install -Dm644 "models/scene/$m" "/app/share/darkroom/models/$m"
done
# The two runtimes the app chooses between at launch
# (docs/dev/inference.md §3.2): Intel's OpenVINO build and the generic
# WebGPU one, each with ONNX Runtime's CPU provider — 8–10× the
# built-in tract on any machine. Pinned wheels, fetched over the
# build's network. In the sandbox the OpenVINO rung finds no Intel
# OpenCL driver and the probe settles on the CPU; WebGPU reaches the
# GPU through the runtime's Vulkan.
- ./tools/fetch-bundled-runtimes.sh linux /app/lib/darkroom/runtimes
- install -Dm644 README.md /app/share/doc/darkroom/README.md
sources:
+7
View File
@@ -84,6 +84,12 @@ Section "DarkRoom" SecMain
SetOutPath "$INSTDIR\manual"
File /r "${STAGE}\manual\*"
; ONNX Runtime, twice: Intel's OpenVINO build and the WebGPU build. The
; application opens both and keeps the one that fits the GPU
; (docs/dev/inference.md §3.2); each also runs the models on every core.
SetOutPath "$INSTDIR\runtimes"
File /r "${STAGE}\runtimes\*"
WriteUninstaller "$INSTDIR\uninstall.exe"
; Add/Remove Programs. HKCU, to match the per-user install.
@@ -123,6 +129,7 @@ Section "Uninstall"
Delete "$INSTDIR\uninstall.exe"
RMDir /r "$INSTDIR\models"
RMDir /r "$INSTDIR\manual"
RMDir /r "$INSTDIR\runtimes"
RMDir "$INSTDIR"
Delete "$SMPROGRAMS\${NAME}\${NAME}.lnk"