fix(flatpak): bundle onnxruntime for Silero VAD (#1002)
* fix(flatpak): bundle onnxruntime for Silero VAD Bundle the [vad] extra in the Flatpak and select the matching CPython wheel for each architecture. Fixes #969 * docs(flatpak): keep the runtime.txt history in the sync script docstring --------- Co-authored-by: Jatin K Malik <jatinkrmalik@gmail.com>
This commit is contained in:
co-authored by
Jatin K Malik
parent
e53fc2ceb0
commit
1909f45fdf
@@ -42,9 +42,10 @@ contributors (below).
|
||||
|
||||
## Current Scope
|
||||
|
||||
The manifest ships the default `whisper_cpp` engine only. VOSK is omitted because
|
||||
the PyPI package is wheel-only (no sdist), so a Flathub-ready VOSK build would
|
||||
need to compile VOSK and its native deps from source.
|
||||
The manifest ships the default `whisper_cpp` engine and Silero VAD
|
||||
(`onnxruntime`). VOSK is omitted because the PyPI package is wheel-only (no
|
||||
sdist), so a Flathub-ready VOSK build would need to compile VOSK and its native
|
||||
deps from source.
|
||||
|
||||
Global keyboard shortcuts use **evdev** (`/dev/input`) on Wayland and
|
||||
XWayland. On native X11, they use the X11 **pynput** listener through
|
||||
@@ -127,9 +128,10 @@ flatpak-builder --run build-dir packaging/flatpak/com.vocalinux.Vocalinux.yml \
|
||||
|
||||
## Python Dependencies
|
||||
|
||||
`python3-dependencies.yaml` is generated from `requirements/runtime.txt`, the
|
||||
hash-pinned export `just lock` writes out of `uv.lock`. Refresh it whenever the
|
||||
dependency set changes:
|
||||
`python3-dependencies.yaml` is generated from `requirements/vad.txt`, the
|
||||
hash-pinned export `just lock` writes out of `uv.lock`. This includes the
|
||||
runtime dependencies plus the `[vad]` extra. Refresh it whenever the dependency
|
||||
set changes:
|
||||
|
||||
```bash
|
||||
just flatpak-deps # rewrite the manifest (needs PyPI)
|
||||
@@ -142,7 +144,9 @@ no extra step.
|
||||
The script resolves each package's URL by looking up the digest uv already
|
||||
recorded, so the bytes this build downloads are the bytes in `uv.lock`, not
|
||||
merely the same version number. It takes a universal wheel where one exists and
|
||||
the sdist otherwise; an ABI-tagged wheel would pin the build to one SDK Python.
|
||||
the sdist otherwise. `onnxruntime` has no sdist, so its CPython-ABI wheel is
|
||||
pinned to GNOME 50's Python version and selected separately for each Flatpak
|
||||
architecture.
|
||||
|
||||
This replaced a `flatpak-pip-generator` invocation whose package list was typed
|
||||
out on the command line. Nothing regenerated it and no test compared it to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by scripts/sync_flatpak_deps.py from requirements/runtime.txt, the
|
||||
# Generated by scripts/sync_flatpak_deps.py from requirements/vad.txt, the
|
||||
# hash-pinned export `just lock` writes out of uv.lock. Run `just flatpak-deps`
|
||||
# after any dependency change; `just flatpak-deps-check` and
|
||||
# tests/test_flatpak_packaging.py fail when this file falls behind.
|
||||
@@ -144,6 +144,30 @@ modules:
|
||||
--prefix=${FLATPAK_DEST} "numpy" --no-build-isolation
|
||||
sources:
|
||||
- *id008
|
||||
- name: python3-onnxruntime
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
|
||||
--prefix=${FLATPAK_DEST} "onnxruntime" --no-build-isolation
|
||||
sources:
|
||||
- type: file
|
||||
url: https://files.pythonhosted.org/packages/83/2c/d8eb945d2a372149df9705a8d5c8d7c6c46c987c5446dbcea9e1ea7f6556/onnxruntime-1.29.0-cp313-cp313-manylinux_2_28_x86_64.whl
|
||||
sha256: e2128f31f449e922c62dbe5d8b6b7b079f0bcaf2d56a102fa203cb6e5bb5ab19
|
||||
only-arches: [x86_64]
|
||||
- type: file
|
||||
url: https://files.pythonhosted.org/packages/c9/17/b9ad04051a8c4f504852ce0e8e10f9a6b2f1a331eedcdcc503df776dd0ea/onnxruntime-1.29.0-cp313-cp313-manylinux_2_28_aarch64.whl
|
||||
sha256: d67673c5367727860922c5262d724472f1b5539fb7ccf4c81a638f9b71719803
|
||||
only-arches: [aarch64]
|
||||
- type: file
|
||||
url: https://files.pythonhosted.org/packages/e8/2d/d2a548598be01649e2d46231d151a6c56d10b964d94043a335ae56ea2d92/flatbuffers-25.12.19-py2.py3-none-any.whl
|
||||
sha256: 7634f50c427838bb021c2d66a3d1168e9d199b0607e6329399f04846d42e20b4
|
||||
- type: file
|
||||
url: https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl
|
||||
sha256: d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c
|
||||
- type: file
|
||||
url: https://files.pythonhosted.org/packages/19/c7/5f7c636ec43e0c545e28d1f1db71990108306f7bdcb89f069ba97e428e7f/protobuf-7.35.1-py3-none-any.whl
|
||||
sha256: 4bc97768d8fe4ad6743c8a19403e314511ed9f6d13205b687e52421c023ac1b9
|
||||
- *id008
|
||||
- name: python3-pyaudio
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
|
||||
Reference in New Issue
Block a user