Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Packaging a Python ML Sidecar Inside a Signed Mac App: 9 Traps from Production

说明与用途

将Python ML堆栈嵌入签名的macOS应用程序,保持小下载大小并确保运行时稳定。

问题

Integrating a Python ML stack into a signed, notarized, sandbox‑friendly macOS app while keeping the download size small and ensuring runtime stability.

结果

The app now launches reliably, handles control commands promptly, runs entirely offline, and keeps the initial download to ~122 MB while downloading large model packs on demand.

工作流

  • 1. Build a launcher that starts with no arguments and defaults to serve mode. 2. Define the JSONL protocol with version numbers as strings. 3. Separate data and control planes; use independent write locks for control commands. 4. Vendored the entire Python environment and required wheels. 5. Build whisper.cpp from source with static linking and Metal support. 6. Sign all relocated dylibs with disable‑library‑validation and re‑sign after moves. 7. Replace missing ffmpeg subtitle filters with PNG‑based word highlighting. 8. Enforce sandbox‑safe path resolution and reject symlink escapes. 9. Ship a ~122 MB DMG and download model packs on first launch, with cancelable downloads and disk‑space checks.

证据

The packaged launcher must start with no arguments.

来源

v is a string.

来源

The fix, shipped in v1.9.1: split the hub into a data plane and a control plane with an independent write‑side lock.

来源

The entire Python environment ships inside the app as a vendored sidecar-site.

来源

The DMG is ~122MB — app shell, UI, a sample book, and no models.

来源

  • 记录日期: 2026-10-04T15:55:44.760Z