Phase 2: Volume Wizard, GPU & device passthrough (0.2.0)

Backend:
- gpu_service: detect NVIDIA (nvidia-smi) + AMD/Intel (/dev/dri, sysfs);
  inject helpers (nvidia deploy.reservations, /dev/dri + groups + LIBVA)
- volume_service: list/orphaned/prune volumes; NFS/SMB/named/bind/tmpfs
  YAML generation (generate-yaml)
- device_service: USB/TTY/DRI detection + sandboxed host path browser
- compose_edit_service: server-side merge of volume/gpu/device fragments
- routers: volumes (+host paths), editor (services/add-volume/set-gpu/
  add-device/remove-device/set-privileged), system gpus+devices
- compose: bind-mount /dev:ro for detection

Frontend:
- split-pane StackEditor with helper panel (service picker + tabs)
- VolumeWizard (bind/named/nfs/smb/tmpfs) + HostPathBrowser
- GPUSelector, DevicePanel; api clients for volumes/editor/system

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-07 16:35:22 +00:00
co-authored by Claude Opus 4.8
parent 7775128c07
commit b553c1b861
20 changed files with 1841 additions and 26 deletions
+21
View File
@@ -0,0 +1,21 @@
import api from "./client";
import type { HostPathResult, VolumeInfo } from "@/types";
export const volumesApi = {
list: () => api.get<VolumeInfo[]>("/api/volumes").then((r) => r.data),
orphaned: () =>
api.get<VolumeInfo[]>("/api/volumes/orphaned").then((r) => r.data),
remove: (name: string, force = false) =>
api.delete(`/api/volumes/${name}?force=${force}`).then((r) => r.data),
prune: () => api.post("/api/volumes/prune").then((r) => r.data),
generateYaml: (spec: Record<string, unknown>) =>
api
.post<{ yaml: string }>("/api/volumes/generate-yaml", spec)
.then((r) => r.data.yaml),
hostPaths: (path: string, showHidden = false) =>
api
.get<HostPathResult>(
`/api/host/paths?path=${encodeURIComponent(path)}&show_hidden=${showHidden}`
)
.then((r) => r.data),
};