perf(unraid): move inference to less contended RTX 3090

This commit is contained in:
Codex
2026-08-15 10:14:59 -07:00
parent f77b815fa7
commit cd29046592
2 changed files with 6 additions and 5 deletions
@@ -71,7 +71,8 @@ def authorized(authorization: str | None = Header(default=None)) -> None:
def gpu_info() -> dict:
try:
nvmlInit(); handle = nvmlDeviceGetHandleByIndex(0); memory = nvmlDeviceGetMemoryInfo(handle)
nvmlInit(); physical_index = int(os.getenv("CUDA_VISIBLE_DEVICES", "0").split(",")[0])
handle = nvmlDeviceGetHandleByIndex(physical_index); memory = nvmlDeviceGetMemoryInfo(handle)
name = nvmlDeviceGetName(handle)
if isinstance(name, bytes): name = name.decode()
return {"name": name, "cuda_available": torch.cuda.is_available(),