igneum/relay/playbooks/prover-setup.ps1
igneum-labs 53f7f55796 Relay: text, files and runnable tasks between the Mac, the PCs and the phone (relay.igneum.network)
New Vercel project igneum-relay from relay/: one function (api/relay.mjs) over Neon tables relay_items and relay_machines,
files in Vercel Blob store igneum-relay (50 MB client uploads, 4 MB through the function), phone-first web page at /r/<token>/
with the site tokens. Mac CLI tools/relay.mjs (feed, read, drop, task, run, watch, inbox, machines, role, name).
Windows clients send.bat/send.ps1 and the igneum-agent (registers hostname, role, GPUs, WSL, nvcc; runs queued PowerShell
scripts, posts results, reboot-continue via scheduled task + RunOnce), bash twins send.sh and agent.sh (verified live),
playbooks for WSL setup, prover setup, prove-block, miner v4, one-click placeholder. make-clients.sh bakes the secrets
into a zip; the repo copies hold placeholders. Screenshots under docs/design/relay.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-04 10:04:30 +00:00

26 lines
2 KiB
PowerShell

# Igneum playbook: install the SP1 prover package inside WSL (CUDA toolkit, Rust, sp1up, pre-build). Needs wsl-setup first.
# Queue: node tools/relay.mjs run PC2 "prover setup" relay/playbooks/prover-setup.ps1
# Downloads igneum-prove-wsl2.zip from the downloads host (relay.mjs fills __DL_BASE__ in), extracts to C:\igneum-prove,
# runs setup-wsl.sh as the igneum user with sudo unlocked (NOPASSWD from wsl-setup; sudo -S with the password as a fallback).
# 15 to 40 minutes, 4 to 5 GB of downloads (approximate, from the package README). UNTESTED on a PC as of 4 Oct 2026.
$ErrorActionPreference = 'Continue'
$distro = 'Ubuntu-24.04'
$zipUrl = '__DL_BASE__/igneum-prove-wsl2.zip'
$root = 'C:\igneum-prove'
$zip = Join-Path $env:TEMP 'igneum-prove-wsl2.zip'
function Strip([string] $s) { if ($null -eq $s) { return '' }; return ($s -replace "`0", '') }
Write-Host "downloading $zipUrl"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $zipUrl -OutFile $zip -UseBasicParsing -TimeoutSec 600
New-Item -ItemType Directory -Force -Path $root | Out-Null
Expand-Archive -Path $zip -DestinationPath $root -Force
$pkg = Join-Path $root 'igneum-prove-wsl2'
if (-not (Test-Path (Join-Path $pkg 'setup-wsl.sh'))) { Write-Host "ERROR: setup-wsl.sh missing under $pkg"; exit 2 }
$linuxDir = '/mnt/c/igneum-prove/igneum-prove-wsl2'
Write-Host "running setup-wsl.sh inside $distro as igneum (sudo unlocked)"
$cmd = "echo igneum | sudo -S -v 2>/dev/null; sudo -n true || echo 'sudo still asks for a password: wsl-setup did not run'; cd $linuxDir && bash ./setup-wsl.sh"
& wsl.exe -d $distro -u igneum -- bash -lc $cmd 2>&1 | ForEach-Object { Strip "$_" }
$rc = $LASTEXITCODE
Write-Host "setup-wsl.sh exit $rc"
& wsl.exe -d $distro -u igneum -- bash -lc 'export PATH="$HOME/.cargo/bin:$HOME/.sp1/bin:$PATH"; cargo prove --version; ls -la $HOME/igneum-prove/proving/igneum-prove/target/release/igneum-prove-host 2>/dev/null || echo "host binary not built"' 2>&1 | ForEach-Object { Strip "$_" }
exit $rc