Default the dashboard to port 11340
New installs use 11340 instead of 8080, which is often taken by other dev servers. Existing installs keep their saved port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
This commit is contained in:
parent
0611efd154
commit
c08a548fe0
2 changed files with 8 additions and 6 deletions
|
|
@ -7,7 +7,7 @@ installs the inference backend, and runs it as a background service with a web d
|
|||
- **Linux + NVIDIA** → [vLLM](https://github.com/vllm-project/vllm)
|
||||
- **macOS on Apple Silicon** → [MLX](https://github.com/ml-explore/mlx-lm), behind a small proxy that adds API keys
|
||||
|
||||
Either way you get the same OpenAI-compatible API (with an API key) on port 8000 and a dashboard on port 8080.
|
||||
Either way you get the same OpenAI-compatible API (with an API key) on port 8000 and a dashboard on port 11340.
|
||||
Everything installs into your home directory; no sudo, Docker or system CUDA toolkit needed.
|
||||
|
||||
## Install
|
||||
|
|
@ -25,7 +25,7 @@ Pass setup options after `--`:
|
|||
/bin/bash -c "$(curl -fsSL https://git.neilbantoc.dev/pub/llm-host/raw/branch/main/install.sh)" -- --yes --default ornith-1.5-35b
|
||||
```
|
||||
|
||||
Ports: the API defaults to 8000 and the dashboard to 8080. On a first install a busy default moves to the
|
||||
Ports: the API defaults to 8000 and the dashboard to 11340. On a first install a busy default moves to the
|
||||
next free port; after that the ports are saved and never move on their own (clients are configured with them).
|
||||
Change them with `llmhost setup --api-port <port> --web-port <port>`. On a Mac, MLX also uses the API port + 1.
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ PYTHONPATH=. python3 -P -m llmhost plan --simulate apple:64 # a 64 GB Mac
|
|||
| `llmhost update` | pull the latest llm-host and re-plan (`--backend` also upgrades vLLM/MLX) |
|
||||
| `llmhost uninstall [--purge] [--models]` | remove services and backends; asks before deleting downloaded models (`--models` deletes without asking) |
|
||||
|
||||
The dashboard (`http://<host>.local:8080`) shows the active model, throughput, KV cache, GPU utilization,
|
||||
The dashboard (`http://<host>.local:11340`) shows the active model, throughput, KV cache, GPU utilization,
|
||||
temperature and power with 10-minute charts, the server log, and buttons to switch models or stop the server.
|
||||
|
||||
## Connecting opencode
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ from . import hfcache, hw, opencode, paths, plan, service
|
|||
from .backends import vllm as vllm_backend # stdlib-only module; safe to import anywhere
|
||||
|
||||
VERSION = "0.1.0"
|
||||
DEFAULT_API_PORT = 8000
|
||||
DEFAULT_WEB_PORT = 11340
|
||||
|
||||
|
||||
def say(msg=""):
|
||||
|
|
@ -147,13 +149,13 @@ def cmd_setup(a):
|
|||
# Stopping returns before the old processes have let go of their ports (launchd
|
||||
# especially), so wait for our own ports to close before checking what's free.
|
||||
if old.get("api_port"):
|
||||
ours = list(range(old["api_port"], old["api_port"] + api_span)) + [old.get("web_port", 8080)]
|
||||
ours = list(range(old["api_port"], old["api_port"] + api_span)) + ([old["web_port"]] if old.get("web_port") else [])
|
||||
wait_ports_free(ours, timeout=30)
|
||||
# Ports saved by an earlier setup are pinned: clients are configured with them, so a
|
||||
# busy saved port is an error, never a reason to move. Only a first install auto-picks.
|
||||
api_port = choose_port("API", a.api_port, old.get("api_port", 8000), api_span, a.no_start,
|
||||
api_port = choose_port("API", a.api_port, old.get("api_port", DEFAULT_API_PORT), api_span, a.no_start,
|
||||
avoid=set(), pinned="api_port" in old)
|
||||
web_port = choose_port("dashboard", a.web_port, old.get("web_port", 8080), 1, a.no_start,
|
||||
web_port = choose_port("dashboard", a.web_port, old.get("web_port", DEFAULT_WEB_PORT), 1, a.no_start,
|
||||
avoid=set(range(api_port, api_port + api_span)), pinned="web_port" in old)
|
||||
|
||||
say(f"\n== Installing {p['backend']} (this can take several minutes) ==")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue