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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
This commit is contained in:
parent
5b9586ac80
commit
f0ea0bd7bb
2 changed files with 11 additions and 1 deletions
|
|
@ -73,6 +73,14 @@ def build_cuda_home(log=print):
|
||||||
for sub, target in (("bin", "bin"), ("include", "include"), ("lib", "lib64"), ("lib64", "lib64"), ("nvvm", "nvvm")):
|
for sub, target in (("bin", "bin"), ("include", "include"), ("lib", "lib64"), ("lib64", "lib64"), ("nvvm", "nvvm")):
|
||||||
if (pkg / sub).is_dir():
|
if (pkg / sub).is_dir():
|
||||||
_link_tree(pkg / sub, CUDA_DIR / target)
|
_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"
|
lib = CUDA_DIR / "lib64"
|
||||||
if lib.is_dir():
|
if lib.is_dir():
|
||||||
for f in lib.glob("lib*.so.*"):
|
for f in lib.glob("lib*.so.*"):
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ Done.
|
||||||
API: http://{host}:{cfg['api_port']}/v1 (OpenAI-compatible)
|
API: http://{host}:{cfg['api_port']}/v1 (OpenAI-compatible)
|
||||||
Dashboard: http://{host}:{cfg['web_port']}
|
Dashboard: http://{host}:{cfg['web_port']}
|
||||||
API key: {paths.KEY_FILE} (show it with: llmhost key)
|
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.""")
|
Connect opencode: run `llmhost opencode-config` and follow what it prints.""")
|
||||||
|
|
||||||
|
|
@ -183,6 +183,8 @@ def cmd_switch(a):
|
||||||
|
|
||||||
def cmd_ctl(a):
|
def cmd_ctl(a):
|
||||||
_service_check()
|
_service_check()
|
||||||
|
if a.cmd == "start":
|
||||||
|
service.start("web") # after `setup --no-start` neither service is running
|
||||||
getattr(service, a.cmd)("model")
|
getattr(service, a.cmd)("model")
|
||||||
say(f"model server: {a.cmd} requested")
|
say(f"model server: {a.cmd} requested")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue