Releasing, publishing and extending Verity
Verity distributes across three coordinated channels, each matched to its artifact class:
| Artifact | Host | Identifier | Engineering Rationale |
|---|---|---|---|
Standalone single binary (verity-linux-x86_64), checksums, install.sh, & Compose bundle | GitHub Releases | ADPer0705/verity | Versioned binary + checksum assets with CDN downloads; avoids PyPI's single-env constraints |
| Container images | GitHub Container Registry | ghcr.io/adper0705/verity | Native GITHUB_TOKEN pushes, public pulls with zero rate limits, semver + :slim tagging |
| Redistributable checkpoints (28 files, 6.32 GB) | Hugging Face Hub | ADPer/verity-weights | Native Git LFS handling for >2 GB sets, model cards with CC BY-NC attribution, resolve/<rev>/<path> CDN URLs |
PyPI (sdist/wheel) is intentionally skipped: labs install a single binary + install.sh, letting Verity itself manage isolated uv environments per detector.
Standalone single binary & glibc portability
Why ubuntu-22.04 (glibc 2.35) matters
PyInstaller bundles Python interpreter binaries linked dynamically against the build host's GNU C Library (glibc). Building a release binary on a rolling/cutting-edge distribution (for example Fedora with glibc 2.44) produces an executable that fails immediately with GLIBC_2.xx not found on LTS workstations. .github/workflows/release.yml pins the binary job to runs-on: ubuntu-22.04 (glibc 2.35), producing binaries portable across Ubuntu 22.04/24.04, Debian 12+, RHEL 9+, Fedora 38+, and newer systems.
What scripts/build_binary.py embeds
scripts/build_binary.py compiles packaging/verity_entry.py via PyInstaller (--onefile) embedding:
- Python 3.12 runtime +
verity+verity_api+ Uvicorn/FastAPI/WeasyPrint; - Pre-built React Web Console SPA (
src/verity_ui/dist); - Source code,
detector.yaml,pyproject.toml,output_parser.py,weights_manifest.yaml, andweights/README.mdfor all 58 detectors (explicitly excluding all checkpoint binaries); - OpenCV Haar cascades (
--collect-data cv2).
Two subtle build/release engineering choices keep builds reliable:
- Disk-backed temporary directory:
build_binary.pycreates its temp working directory insidedist-release/(dir=str(out_dir)) instead of/tmp, preventingobjcopy/ extraction failures on systems with small RAM-backed/tmptmpfs mounts. - Collision-free checksum filenames:
build_binary.pyemitsverity-linux-x86_64.sha256andverity-<version>-linux-x86_64.sha256, whilescripts/build_deploy_bundle.pyemitsSHA256SUMSandSHA256SUMS-<version>. Separate release jobs can attach all assets to the same GitHub Release without overwriting each other's checksum files.
Build and smoke-test locally:
uv sync --frozen --extra api --extra build
uv run python scripts/build_binary.py --version 0.6.0 --out dist-release
(cd dist-release && sha256sum -c verity-linux-x86_64.sha256)
VERITY_HOME=/tmp/verity-smoke ./dist-release/verity-linux-x86_64 --versionHugging Face checkpoint mirror (ADPer/verity-weights)
verity weights bundle (src/verity/weights/bundle.py) lays out an attributed, offline-verified mirror containing only redistributable: true files (28 checkpoints, ~6.32 GB), a generated README.md crediting upstream authors and clearly stating zero checkpoints were trained by Verity's maintainer, NOTICE.md, LICENSE, manifest.json, sha256sums.txt, and LFS .gitattributes (*.pth, *.pt, *.safetensors, *.onnx, *.model, *.tar, *.bin):
uv run verity weights pull --all
uv run verity weights bundle --repo ADPer/verity-weights --out dist-weights
hf repos create ADPer/verity-weights --type model --public --exist-ok
hf upload ADPer/verity-weights dist-weights/verity-weights . --repo-type model \
--commit-message "Verity v0.6.0 redistributable checkpoints mirror"Verify mirror resolution cleanly:
VERITY_WEIGHTS_HUB=ADPer/verity-weights \
uv run verity weights pull --detector univfd --force --source hub
VERITY_OFFLINE=1 uv run verity weights verifyThe 11 origin-only / un redistributable checkpoints (npr, mlep, df40_clip, effort, xlsr_sls, ftcn, d3, prodet, lipfd, sbi, laa_net) are never copied into dist-weights/ and continue resolving exclusively from upstream URLs.
Containers (GHCR :slim vs manual :cuda/:cpu)
Dockerfile defines a multi-stage build:
slim(automated by CI on tagsv*): bundles orchestrator, FastAPI API, SPA,ffmpeg, Pango/Cairo, and detector definitions; detector virtualenvs build on first use or viadeploy/install.sh. Built automatically in.github/workflows/release.ymlbecause GitHub hosted runners lack disk for full pre-baked images.full(--target full --build-arg VERITY_PROFILE=cuda|cpu, manual): pre-bakes every trained detector environment inside/opt/verity/envs(10–20 GB) for organizations that want instant-boot offline containers. Build and push from a high-disk workstation (>= 60 GBfree).
Release process & version synchronization
Before pushing a vX.Y.Z tag, keep the same version string synchronized across:
pyproject.toml([project] version)src/verity/__init__.py(__version__)src/verity_ui/package.json(+package-lock.json)CITATION.cffandCHANGELOG.mdsrc/verity_api/main.py(readsverity.__version__dynamically)
Release checklist
uv run pytest -qgreen;npm --prefix src/verity_ui run typecheck && npm run buildgreen.uv run verity weights status --verifyclean (0corrupt).- Hugging Face
ADPer/verity-weightsmirror uploaded and public resolve verified. scripts/build_deploy_bundle.py&bash -n install.sh deploy/install.sh deploy/doctor.shgreen.- CI workflow (
.github/workflows/ci.yml:test,ui,image-slim) passes onmain. - Tag
vX.Y.Zand push; verify.github/workflows/release.yml(slim,binaryonubuntu-22.04,deploy-bundle) attachesverity-linux-x86_64,verity-<version>-linux-x86_64,.sha256files,install.sh,verity-deploy-*.tar.gz, andSHA256SUMS*.
Rollback
- Weights: Revert
hub.revisionindetectors/weights_manifest.yamlor restore the prior Hugging Face commit; Verity's SHA-256 check refuses mismatches. - Container & Binary: Re-tag or roll back to the previous release semver asset; existing
<data_dir>/weightsand Docker volumes persist independently of binaries.
Extending Verity & testing strategy (CONTRIBUTING.md)
To add a new detector port:
- Create
detectors/<id>/withdetector.yaml(capabilities,input_mode,targets, honestweightstier),pyproject.toml,model.py(build_model, normalized[real, fake]logits),inference.pydelegating tocommon.engine.run_detector, optionaloutput_parser.py, andweights/README.md. - Add checkpoint metadata to
detectors/weights_manifest.yaml(truthfully settingredistributable: falseunless upstream license explicitly allows redistribution). - Regenerate notices (
uv run python scripts/gen_third_party_notices.py) and verifyuv run python scripts/gen_detector_table.py. - Add lightweight unit coverage in
tests/(registry parsing, selection decisions, output mapping, and deterministic reports) — unit tests run cleanly without GPU or heavy weight downloads. Heavy per-detector runtime profiling is handled separately viascripts/run_detector_matrix.py(output/matrix_runs.md).
Related pages
- Deployment, configuration and air-gap operations — lab setup and USB transfer workflows.
- Weights and checkpoints — manifest schema and license gate.
- Detector runtime and isolation — detector package contract.