From f0ea0bd7bbd97f5f12f27cf8e227edaa9fe9245a Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 2 Nov 2026 03:52:33 -0800 Subject: [PATCH] Fix nvcc self-test: copy nvcc into the merged CUDA tree nvcc resolves its toolkit from its real path, so a symlink made it look for lib64 inside a single pip wheel and fail to link cudart_static. Also make `llmhost start` start the dashboard after `setup --no-start`. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca --- llmhost/backends/vllm.py | 8 ++++++++ llmhost/cli.py | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/llmhost/backends/vllm.py b/llmhost/backends/vllm.py index 5183c9c..4d4bbbf 100644 --- a/llmhost/backends/vllm.py +++ b/llmhost/backends/vllm.py @@ -73,6 +73,14 @@ def build_cuda_home(log=print): for sub, target in (("bin", "bin"), ("include", "include"), ("lib", "lib64"), ("lib64", "lib64"), ("nvvm", "nvvm")): if (pkg / sub).is_dir(): _link_tree(pkg / sub, CUDA_DIR / target) + # nvcc finds the toolkit (lib64, nvvm, include) relative to its *real* path, so a symlink + # would send it back into a single wheel's directory. A copy makes it use the merged tree. + for name in ("nvcc", "nvcc.profile"): + p = CUDA_DIR / "bin" / name + if p.is_symlink(): + real = p.resolve() + p.unlink() + shutil.copy2(real, p) lib = CUDA_DIR / "lib64" if lib.is_dir(): for f in lib.glob("lib*.so.*"): diff --git a/llmhost/cli.py b/llmhost/cli.py index f741ee7..829cfc1 100644 --- a/llmhost/cli.py +++ b/llmhost/cli.py @@ -126,7 +126,7 @@ Done. API: http://{host}:{cfg['api_port']}/v1 (OpenAI-compatible) Dashboard: http://{host}:{cfg['web_port']} API key: {paths.KEY_FILE} (show it with: llmhost key) - Model: {active} — {"loading" if hfcache.is_downloaded(first["repo"]) else "downloading, then loading"}; watch with: llmhost logs -f + Model: {active} — {"not started yet; run: llmhost start" if a.no_start else ("loading" if hfcache.is_downloaded(first["repo"]) else "downloading, then loading") + "; watch with: llmhost logs -f"} Connect opencode: run `llmhost opencode-config` and follow what it prints.""") @@ -183,6 +183,8 @@ def cmd_switch(a): def cmd_ctl(a): _service_check() + if a.cmd == "start": + service.start("web") # after `setup --no-start` neither service is running getattr(service, a.cmd)("model") say(f"model server: {a.cmd} requested")