Files
hermes 65c2ea3d50 feat(pinokio): clean one-click launcher for multi-tts-server
- install: clone app source, create venv, install deps + torch + models
- start: daemon uvicorn on 127.0.0.1 with auto-captured URL
- reset: remove venv/cache/models but keep source
- update: pull both launcher and app, then re-install
- sanitized: no local env details, no TODO/DONE
- icon.png included
2026-07-04 01:38:23 +08:00

87 lines
2.8 KiB
JavaScript

// Platform-aware PyTorch installer.
// CUDA 12.8 wheels for NVIDIA, DirectML for AMD, CPU fallback.
module.exports = {
run: [
// Windows + NVIDIA
{
"when": "{{platform === 'win32' && gpu === 'nvidia'}}",
method: "shell.run",
params: {
venv: "{{args.venv}}",
path: "{{args.path}}",
message: [
"uv pip install torch==2.11.0 torchvision==0.21.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu128 --force-reinstall"
]
},
next: null
},
// Windows + AMD (DirectML)
{
"when": "{{platform === 'win32' && gpu === 'amd'}}",
method: "shell.run",
params: {
venv: "{{args.venv}}",
path: "{{args.path}}",
message: "uv pip install torch-directml torchaudio torchvision --force-reinstall"
},
next: null
},
// Windows CPU
{
"when": "{{platform === 'win32' && (gpu !== 'nvidia' && gpu !== 'amd')}}",
method: "shell.run",
params: {
venv: "{{args.venv}}",
path: "{{args.path}}",
message: "uv pip install torch==2.11.0 torchvision==0.21.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall"
},
next: null
},
// macOS (CPU only — Apple Silicon uses MPS automatically)
{
"when": "{{platform === 'darwin'}}",
method: "shell.run",
params: {
venv: "{{args.venv}}",
path: "{{args.path}}",
message: "uv pip install torch==2.11.0 torchvision==0.21.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall"
},
next: null
},
// Linux + NVIDIA
{
"when": "{{platform === 'linux' && gpu === 'nvidia'}}",
method: "shell.run",
params: {
venv: "{{args.venv}}",
path: "{{args.path}}",
message: [
"uv pip install torch==2.11.0 torchvision==0.21.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu128 --force-reinstall"
]
},
next: null
},
// Linux + AMD (ROCm 6.4)
{
"when": "{{platform === 'linux' && gpu === 'amd'}}",
method: "shell.run",
params: {
venv: "{{args.venv}}",
path: "{{args.path}}",
message: "uv pip install torch==2.11.0 torchvision==0.21.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/rocm6.4 --force-reinstall"
},
next: null
},
// Linux CPU
{
"when": "{{platform === 'linux' && (gpu !== 'amd' && gpu !== 'nvidia')}}",
method: "shell.run",
params: {
venv: "{{args.venv}}",
path: "{{args.path}}",
message: "uv pip install torch==2.11.0 torchvision==0.21.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cpu --force-reinstall"
}
}
]
}