Files
breakpilot-lehrer/scripts/mflux-download-model.sh
Benjamin Admin aa136a9f80
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 30s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 1m59s
CI / test-python-agent-core (push) Successful in 17s
CI / test-nodejs-website (push) Successful in 20s
chore: add mflux model download script for off-peak scheduling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 11:20:53 +01:00

27 lines
850 B
Bash
Executable File

#!/bin/bash
# Download Flux Schnell model (~12 GB) and start mflux-service.
# Schedule via: at 23:30 < scripts/mflux-download-model.sh
# Or: echo "bash /Users/benjaminadmin/Projekte/breakpilot-lehrer/scripts/mflux-download-model.sh" | at 23:30
LOG="/tmp/mflux-download.log"
VENV="$HOME/mflux-env"
SCRIPT="$HOME/Projekte/breakpilot-lehrer/scripts/mflux-service.py"
echo "$(date): Starting Flux Schnell model download..." >> "$LOG"
# Generate a test image to trigger model download
"$VENV/bin/mflux-generate" \
--model schnell \
--prompt "test" \
--steps 2 \
--width 256 --height 256 \
-o /tmp/mflux-test.png \
>> "$LOG" 2>&1
echo "$(date): Model download complete. Starting mflux-service..." >> "$LOG"
# Start the service
nohup "$VENV/bin/python" "$SCRIPT" >> "$LOG" 2>&1 &
echo "$(date): mflux-service started (PID $!)." >> "$LOG"