chore: add mflux model download script for off-peak scheduling
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
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
26
scripts/mflux-download-model.sh
Executable file
26
scripts/mflux-download-model.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user