Skip to content

fix(install): complete macOS setup, plus a double-clickable macOS app bundle - #6

Merged
estebanstifli merged 3 commits into
estebanstifli:mainfrom
fabio-krauss:fix/macos-install-and-app-bundle
Nov 21, 2026
Merged

estebanstifli merged 3 commits into
estebanstifli:mainfrom
fabio-krauss:fix/macos-install-and-app-bundle

Conversation

@fabio-krauss

Copy link
Copy Markdown
Contributor

What changed

Two commits, both aimed at making a fresh macOS install actually finish. Neither touches src/, so behaviour on Windows/Linux is unchanged.

1. fix(install): complete macOS setup for PyTorch and llama.cpp

  • PyTorch on Darwin: use the standard PyPI wheel (torch==2.13.0, no --index-url), mirroring the branch scripts/install_torch.py already has. The +cpu local-version builds only exist for Windows/Linux, so torch==2.13.0+cpu against the cpu index never resolved on macOS and set -e aborted the script right after venv creation — before any dependency was installed. The CUDA path and the Windows install.ps1 behaviour are deliberately untouched.
  • llama.cpp: the published macOS arm64 wheels for 0.3.31–0.3.36 are corrupt (full Content-Length, members failing CRC-32). The previous fallback only fired for AI_BACKEND=auto && LLAMA_BACKEND=cuda, so on macOS a corrupt wheel hit exit 1. Now the step tries the newest compatible release, then the newest release known to have intact wheels, then the portable CPU index, and only fails if all of them fail. Once fix(ci): prevent corrupted Metal wheel releases abetlen/llama-cpp-python#2379 lands the first attempt succeeds again and the pinned fallback is never reached.

Fixes #5.

2. feat(macos): a double-clickable app bundle and app icon

macOS had no launcher at all — no Dock icon, nothing in Finder, no /Applications entry; Windows has start.bat. scripts/create_macos_app.sh builds Meet2Notes.app from the existing source install using only tools that ship with macOS (sips, iconutil), with no new downloads:

  • .icns icon in every size macOS asks for, generated from assets/macos/Meet2Notes-1024.png
  • an Info.plist and a launcher that resolves the checkout and execs .venv/bin/meet2notes, so the browser opens on 127.0.0.1:8765 as usual
  • a Finder-appropriate PATH (so Homebrew FFmpeg is found) and ~/Library/Logs/Meet2Notes.log for launches with no terminal attached
  • unsigned but quarantine-free by construction; --install also copies it to /Applications

The icon is a placeholder I drew, not a branding decision — replace assets/macos/Meet2Notes-1024.png with whatever you prefer and the script regenerates everything from it. The .app is a build artifact and stays gitignored.

Validation

  • bash -n install.sh and bash -n scripts/create_macos_app.sh
  • real macOS install (26.7, arm64 M3, Homebrew Python 3.13.9, fresh clone): ./install.sh --ai-backend auto --no-models → Meet2Notes is ready.
  • pip check → no broken requirements; check_environment.py reports Python, platform and FFmpeg paths
  • server started and answered HTTP 200 on http://127.0.0.1:8765
  • ./scripts/create_macos_app.sh → bundle built, launcher resolves the venv and runs the CLI (--help routed to the log file)
  • corrupt-wheel claim verified with curl -L + zipfile.testzip() against 0.3.25/0.3.30 (intact) and 0.3.31–0.3.36 (corrupt), and reproduced with pip itself

ruff/mypy/pytest are unaffected (no Python source changed). If you'd rather review these separately, say so and I'll split commit 2 into its own PR — and if you'd prefer the launcher to be a Pinokio/installer concern instead of a script in the repo, happy to move it.

Use the standard PyPI PyTorch wheel on Darwin, matching scripts/install_torch.py.
The download.pytorch.org '+cpu' local-version builds are Windows/Linux only, so
'torch==2.13.0+cpu' from the cpu index never resolves on macOS and the script
exited before installing any dependency.

Also treat the llama.cpp wheel step as best-effort: the published arm64 wheels
for 0.3.31-0.3.36 fail their CRC-32 checks, and the existing fallback was
CUDA-only, so a corrupt wheel aborted the whole install on macOS. Try the newest
compatible release, then the newest release known to have intact wheels, then the
portable CPU index.

Copy link
Copy Markdown
Owner

Thanks, Fabio, for the detailed report, the fixes, and the testing on your Mac — especially for tracing the wheel corruption upstream.

The Darwin PyTorch fix looks good. Before merging, I’d like to address two points: preserve the project’s dependency constraints during the llama.cpp retries (particularly numpy<2.4), and safely escape the checkout path in the generated app launcher. The current substitution breaks paths containing & and can misinterpret shell characters.

The Pinokio installation path mentioned in #5 also remains affected. Could we cover that too, or explicitly track it separately? Splitting the optional app bundle into a separate PR would help us land the installation fix independently.

Thanks again for contributing and offering to test on macOS!

…ndency ranges

Move the llama.cpp retry chain from install.sh into
scripts/install_llama_cpp.py and call it from install.sh and the Pinokio
install/update scripts, so Pinokio on macOS also steps past the corrupt Metal
wheels reported in estebanstifli#5.

The retries no longer use --force-reinstall, which reinstalled every
dependency without limits and could move numpy past the supported <2.4 range.
Each attempt now passes the ranges declared in pyproject.toml as pip
constraints, and the first attempt is a plain install again, as it was before
on Linux.

Add an installer workflow that runs the real source install on macOS and
Linux when installation files change.
…r sdist

PyPI can carry a newer source release than the wheel index. pip then compiled
it, which fails on machines without a compiler and skipped the prebuilt
wheels entirely.
@estebanstifli
estebanstifli force-pushed the fix/macos-install-and-app-bundle branch from 244fc41 to c79c395 Compare November 21, 2026 19:17
@estebanstifli
estebanstifli merged commit 9854bca into estebanstifli:main Nov 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh cannot complete on macOS: PyTorch pin never resolves, llama.cpp step aborts on corrupt upstream wheels

2 participants