scaffold — FastAPI + SQLite + HTMX dashboard, ingest + dispatcher

- app/main.py : dashboard /, partials /partials/{jobs,monitor} (htmx polling)
- app/templates/ : index, jobs table, monitor card par worker
- app/static/style.css : thème sombre cohérent
- scripts/ingest.py : scan SSD d'acquisition, EXIF CreateDate → segments
  continus par (AUV, GoPro serial) avec seuil configurable
- scripts/dispatcher.py : polling queue, pick worker selon VRAM free,
  extraction ffmpeg + lingbot-map windowed --offload_to_cpu, progression DB
- DB : SQLite (acquisitions + jobs), lifecycle queued→extracting→running→done
- Workers par défaut : .87 (3060 12GB) + .84 (3090 24GB)

Contexte : QC terrain le jour-même (avant photogrammétrie à 30 jours),
plusieurs heures × 2 GoPros × 2-3 AUVs d'enregistrement à traiter en parallèle.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 09:52:41 +00:00
parent 17edbcbd8b
commit b7d957c806
9 changed files with 766 additions and 1 deletions

27
app/templates/index.html Normal file
View File

@@ -0,0 +1,27 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>cosma-qc — dashboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<header>
<h1>cosma-qc</h1>
<span class="sub">post-acquisition QC · lingbot-map pipeline</span>
</header>
<section id="monitor" hx-get="/partials/monitor" hx-trigger="load, every 5s" hx-swap="innerHTML">
<p class="muted">Chargement des workers…</p>
</section>
<section id="jobs">
<h2>Jobs</h2>
<div id="jobs-table" hx-get="/partials/jobs" hx-trigger="load, every 3s" hx-swap="innerHTML">
<p class="muted">Chargement…</p>
</div>
</section>
</body>
</html>