45 lines
2.5 KiB
YAML
45 lines
2.5 KiB
YAML
# fv-ml1: Scriberr -> scriberr:local-blackwell-a353078-ctxwin1 (patches 0001-0004; 0004 = chat's
|
|
# LLM_DEFAULT_CONTEXT_WINDOW, Prime 2026-10-19 "fix the 4k issue"; 0003's pyannote pins ride along).
|
|
# Rebuild verdict PASS (scripts/scriberr-rebuild --suffix ctxwin1). Prime uses Scriberr live in meetings, so the
|
|
# FIRST step is an idle gate that STOPS the run (exit 3) on any queued/processing job, a job start in the last
|
|
# 2 min, or a compute process on GPU 3 - it gates, it does not just print (auto-memory
|
|
# feedback_idle_check_must_gate_the_restart). Rollback: restore .env.bak-ctxwin1 (SCRIBERR_IMAGE=...-dropout2) and
|
|
# `docker compose up -d scriberr`; the old image is kept.
|
|
steps:
|
|
- name: IDLE GATE - no job queued or running, no recent job start, GPU 3 empty
|
|
sudo: true
|
|
shell: |
|
|
busy=$(python3 -c "
|
|
import sqlite3
|
|
c = sqlite3.connect('file:/tank/scriberr/data/scriberr.db?mode=ro', uri=True)
|
|
print(c.execute(\"select count(*) from transcription_jobs where status not in ('completed','failed','cancelled','error')\").fetchone()[0])")
|
|
recent=$(docker logs --since 2m scriberr 2>&1 | grep -c "Processing single-track job")
|
|
gpu=$(nvidia-smi -i 3 --query-compute-apps=pid --format=csv,noheader | grep -c .)
|
|
echo "jobs-not-done=$busy recent-starts=$recent gpu3-procs=$gpu"
|
|
[ "$busy" = 0 ] && [ "$recent" = 0 ] && [ "$gpu" = 0 ] || { echo "BUSY - not deploying"; exit 3; }
|
|
changed_when: "false"
|
|
- name: Back up .env, then select the ctxwin1 image
|
|
sudo: true
|
|
shell: |
|
|
set -e
|
|
cd /opt/docker/compose/scriberr
|
|
cp -p .env .env.bak-ctxwin1
|
|
sed -i 's#^SCRIBERR_IMAGE=.*#SCRIBERR_IMAGE=scriberr:local-blackwell-a353078-ctxwin1#' .env
|
|
chown lkraven:lkraven .env && chmod 600 .env # sed -i as root would leave it root-owned
|
|
grep -n '^SCRIBERR_IMAGE=' .env; stat -c '%U:%G %a' .env
|
|
- name: Recreate scriberr (compose config must parse first)
|
|
sudo: true
|
|
shell: |
|
|
set -e
|
|
cd /opt/docker/compose/scriberr
|
|
docker compose config >/dev/null
|
|
docker compose up -d scriberr 2>&1 | tail -3
|
|
verify:
|
|
- name: Running the new image, with the context-window env inside
|
|
sudo: true
|
|
shell: |
|
|
docker inspect scriberr --format '{{.Config.Image}} {{.State.Status}} restarts={{.RestartCount}}'
|
|
docker exec scriberr sh -c 'echo LLM_DEFAULT_CONTEXT_WINDOW=$LLM_DEFAULT_CONTEXT_WINDOW'
|
|
docker inspect scriberr --format '{{.Config.Image}}' | grep -q ctxwin1
|
|
changed_when: "false"
|