forked from enderofwings/NexusOS
feat(macos): native install path via Homebrew
install-macos.sh mirrors install.sh's split: every portable step - git pull, venv, pip with the right overlay, npm build - stays in bin/sync.py, shared with Linux and Windows. The script only does what sync.py cannot do for itself on a bare Mac, which is install the Homebrew packages needed before a Python exists to run sync.py with. Two stages had to learn about darwin. ensure_exec_bits() keyed off `os.name == "nt"`, which is false on macOS, so it ran the Linux path; and requirements() had no darwin branch. linux_stage() now no-ops there, which is what makes skipping the Ollama fetch correct rather than an omission: bin/fetch-ollama.sh only ships a Linux x86-64 binary, and _ollama_bin() in synapse/ollama_manager.py already prefers the bundled copy and falls back to whatever `ollama` is on PATH. On macOS that is the brewed one, with Metal acceleration and no flags needed. The XFCE desktop branding is Linux-only and was already gated off macOS the same way, so there is nothing to install for it here. install-macos.sh joins the shell-parse list in bin/check.sh. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
affba1805c
commit
6e8067fe7d
@@ -25,6 +25,17 @@ ncp web # memory :8001
|
||||
```
|
||||
This activates the `Promethean` venv and starts the memory service on port 8001 and the Synapse backend on port 8000 (which also serves the built UI). It additionally starts a **Vite dev server** for frontend hot-reload — a Linux-dev convenience, unlike the single-process Windows/production path where the backend serves `dist/` alone. It does **not** start Ollama.
|
||||
|
||||
**macOS (community-supported):**
|
||||
```bash
|
||||
./install-macos.sh # one-time: Homebrew packages + venv + web build, via bin/sync.py
|
||||
./launch_nexus.sh # same script as Linux - it's plain bash, no Linux-only calls
|
||||
```
|
||||
No bundled Ollama binary (Linux x86-64 only) and no XFCE desktop branding — both
|
||||
already no-op on macOS via `bin/sync.py`'s `linux_stage()`. Ollama is instead the
|
||||
Homebrew-installed native binary, picked up automatically because
|
||||
`OllamaManager` falls back to `ollama` on PATH when the bundled binary is
|
||||
absent; that gets full Metal GPU acceleration with no extra config.
|
||||
|
||||
**Individual services via CLI:**
|
||||
```bash
|
||||
# From nexus-core/ with Promethean venv active:
|
||||
@@ -83,7 +94,7 @@ cd interface/web && npm run build
|
||||
## Architecture
|
||||
|
||||
### Python venv
|
||||
All Python code runs inside `Promethean/` (a local venv). Always activate it before running backend commands: `source Promethean/bin/activate`. Dependencies are layered: `requirements-base.txt` holds the GPU-agnostic core, and a thin overlay pins the right PyTorch build for the target — `requirements-amd.txt` (ROCm), `requirements-nvidia.txt` (CUDA, generated by `bin/gen-nvidia-reqs.py`), or `requirements-windows.txt` (CPU-only). `bin/sync.py` (`requirements()`) selects NVIDIA, AMD, or CPU/Windows requirements from the host.
|
||||
All Python code runs inside `Promethean/` (a local venv). Always activate it before running backend commands: `source Promethean/bin/activate`. Dependencies are layered: `requirements-base.txt` holds the GPU-agnostic core, and a thin overlay pins the right PyTorch build for the target — `requirements-amd.txt` (ROCm), `requirements-nvidia.txt` (CUDA, generated by `bin/gen-nvidia-reqs.py`), or `requirements-windows.txt` (CPU-only). `bin/sync.py` (`requirements()`) selects NVIDIA, AMD, CPU/Windows, or — via an explicit `sys.platform == "darwin"` check, since `os.name` alone can't tell macOS apart from Linux — `requirements-base.txt` with no overlay at all for macOS, from the host.
|
||||
|
||||
### Synapse Backend (`synapse/`)
|
||||
FastAPI app at `synapse/main.py`. Key responsibilities:
|
||||
|
||||
Reference in New Issue
Block a user