mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
On 1.x-to-2.0 upgrade the /data/ai/venv already existed with stale packages, so the entrypoint skipped the cp from /opt/venv and 2.0 Python tools failed with ImportError (#85). Dockerfile now writes a SHA-256 of `pip freeze` to /opt/venv/.venv-version at build time. The entrypoint compares that stamp against the copy on the volume; on mismatch it does a clean nuke + re-copy and resets installed.json so the UI correctly shows bundles as needing reinstall. Models in /data/ai/models survive the refresh, so bundle reinstall only reruns pip (model downloads are idempotent). Backward compatible: if the image has no stamp (old build), the entrypoint falls through to the existing skip-if-exists behavior.