diff --git a/README.md b/README.md index 115073cd0..7fed05bba 100644 --- a/README.md +++ b/README.md @@ -516,6 +516,10 @@ Run `curl -fsSL https://raw.githubusercontent.com/jaylfc/taOS/master/scripts/ins | OS packages added | python3 + venv + pip, git, curl, ca-certificates, libtorrent-rasterbar (model torrent mesh), Node.js 22 (qmd + SPA build), sqlite3, libsqlcipher (encrypted secrets), vulkan-tools (hardware detection), postgresql (LiteLLM virtual keys) | | User accounts created | The distro `postgres` system user is created when PostgreSQL is installed. A `litellm` Postgres role and database are created for virtual-key management. Everything else runs as the user who ran the installer. | +### Hailo-10H install (`scripts/install-hailo.sh`) + +Installs `hailo-ollama` (the Hailo-10H LLM runtime) at a pinned ref, listening on port **7836** (port 8000 is the Django slot in taOS port hygiene and is already probed as a llama-cpp/vllm candidate). Before installing, the script checks for a pre-existing upstream hailo-ollama (something answering `GET /api/tags` on `0.0.0.0:8000`, Hailo's own default). If one is found it reports plainly what was detected and exits, leaving the existing instance untouched rather than silently building a second server that would compete for the accelerator and go unseen by taOS. + ### Worker install (`scripts/install-worker.sh`) Linux uses a two-phase install. Phase 1 runs on the bare host; phase 2 runs inside the `taos-worker` LXC. diff --git a/changelog.d/2083-hailo-preinstall-detect.md b/changelog.d/2083-hailo-preinstall-detect.md new file mode 100644 index 000000000..a86ca174e --- /dev/null +++ b/changelog.d/2083-hailo-preinstall-detect.md @@ -0,0 +1,10 @@ +### Changed + +- The Hailo installer (`scripts/install-hailo.sh`) now checks for a pre-existing + hailo-ollama instance on upstream port 8000 before any install or systemd + mutation. When found (a server answering `GET /api/tags` with `"models"`), the + script prints what was detected, reports that it would have built a second + server on port 7836, and exits — leaving the existing instance untouched. This + prevents the silent coexistence bug from issue #2083 where an upstream + hailo-ollama (running on its default `0.0.0.0:8000`) would go unseen while + taOS built a second server and installed no systemd unit. diff --git a/scripts/install-hailo.sh b/scripts/install-hailo.sh index 8b6f39701..0739bcf7c 100755 --- a/scripts/install-hailo.sh +++ b/scripts/install-hailo.sh @@ -240,6 +240,28 @@ detect_hailo() { return 0 } +# -------- (1.5) pre-install detection -------------------------------------- + +# Checks for a pre-existing hailo-ollama instance running on upstream port 8000 +# (Hailo's own default / the Ollama-compatible tags endpoint). When found, logs +# what was detected and exits — taOS must not silently build a second server. +# Port 8000 is the Django slot in taOS port hygiene and is already probed as a +# llama-cpp/vllm candidate, so a coexisting server there also makes those probes +# ambiguous. See issue #2083. +detect_preexisting_hailoollama() { + local url="http://0.0.0.0:8000/api/tags" + local tags + tags="$(curl -fs "$url" 2>/dev/null || true)" + if [[ -n "$tags" ]] && grep -q '"models"' <<<"$tags"; then + warn "pre-existing hailo-ollama detected on :8000 (Hailo's default upstream)" + log "response from $url:" + echo "$tags" | sed 's/^/ /' || true + warn "This installer would have built a second server on port $HAILO_OLLAMA_PORT." + log "The existing instance on :8000 will be left alone (not modified by this script)." + exit 0 + fi +} + # -------- (2) HailoRT + firmware ----------------------------------------- ensure_hailort() { @@ -471,6 +493,9 @@ main() { ;; esac + # Pre-install: check for a pre-existing hailo-ollama on upstream port 8000. + detect_preexisting_hailoollama + resolve_target if already_installed; then