ff6a512630
Working tree (including .git) was lost to an rm. Rebuilt by replaying Write/Edit/ Read/attachment events from 25 Claude sessions and 22 successful codex apply_patch blocks into one timestamp-ordered timeline. Verified against ground truth recorded in the transcripts: wc -l on 10 files and ls -l on 5 files at 2026-07-18T13:13:44Z both match exactly; 18 files are byte-identical to their newest ~/.claude/file-history blob. See HANDOFF.md for sources, gaps, and how to rebuild .venv. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
48 lines
1.4 KiB
Bash
Executable File
48 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# systemd/install.sh — generate + install one system service per workpc process.
|
|
# run with sudo. units run as User=kami off the workpc venv. session manager is ordered first.
|
|
set -euo pipefail
|
|
APP_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
PY="$APP_DIR/.venv/bin/python"
|
|
DEST=/etc/systemd/system
|
|
|
|
# name module port (session_manager guards the GPU; workers want it up first)
|
|
WORKERS=(
|
|
"session session_manager 8095"
|
|
"crop worker_crop 8000"
|
|
"vision worker_vision 8002"
|
|
"identity worker_identity 8003"
|
|
"scene worker_scene 8004"
|
|
"script worker_script 8005"
|
|
"tts worker_tts 8006"
|
|
"layers worker_layers 8007"
|
|
"render worker_render 8008"
|
|
)
|
|
|
|
for spec in "${WORKERS[@]}"; do
|
|
read -r name mod port <<<"$spec"
|
|
wants=""
|
|
[ "$name" != "session" ] && wants="Wants=manga-session.service
|
|
After=manga-session.service"
|
|
unit="manga-${name}.service"
|
|
cat > "$DEST/$unit" <<EOF
|
|
[Unit]
|
|
Description=manga workpc — $name
|
|
$wants
|
|
|
|
[Service]
|
|
User=kami
|
|
WorkingDirectory=$APP_DIR
|
|
Environment=MIOPEN_USER_DB_PATH=/home/kami/.config/miopen MIOPEN_SYSTEM_DB_PATH=/home/kami/.config/miopen MIOPEN_FIND_MODE=2
|
|
ExecStart=$PY -m uvicorn ${mod}:app --host 0.0.0.0 --port ${port}
|
|
Restart=on-failure
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
echo "wrote $DEST/$unit"
|
|
done
|
|
|
|
systemctl daemon-reload
|
|
echo "installed. enable all: systemctl enable --now manga-{session,crop,vision,identity,scene,script,tts,layers,render}"
|