fix(packaging): build bundled pywhispercpp without -march=native (#939)
Good catch, this is what was crashing the AppImage and Flatpak on older CPUs.
This commit is contained in:
@@ -26,7 +26,12 @@ modules:
|
||||
# Assert the shape instead.
|
||||
- python3 -c "from pathlib import Path; p = Path('pywhispercpp-1.5.0/setup.py'); s = p.read_text(); n = 'setup(\\n name=\"pywhispercpp\",'; assert n in s, 'pywhispercpp setup.py no longer matches the injection point'; p.write_text(s.replace(n, n + '\\n version=\"1.5.0\",'))"
|
||||
- tar --owner=0 --group=0 -czf pywhispercpp-1.5.0.tar.gz pywhispercpp-1.5.0
|
||||
- PYWHISPERCPP_VERSION=1.5.0 NO_REPAIR=1 GGML_VULKAN=1 pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
|
||||
# GGML_NATIVE is ggml's default and compiles libggml-cpu with
|
||||
# -march=native, so the package inherits whichever instruction set the
|
||||
# Flatpak builder has. An AVX-512 builder ships a binary that SIGILLs on
|
||||
# any CPU without it (#938). OFF ships the portable baseline the PyPI
|
||||
# wheel carries.
|
||||
- PYWHISPERCPP_VERSION=1.5.0 NO_REPAIR=1 GGML_VULKAN=1 CMAKE_ARGS="-DGGML_NATIVE=OFF" pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
|
||||
--prefix=${FLATPAK_DEST} "pywhispercpp" --no-build-isolation
|
||||
# whisper.cpp installs its shared libraries next to the extension module.
|
||||
# Symlink them onto the default loader path so the extension resolves them
|
||||
|
||||
Reference in New Issue
Block a user