fix(unraid): make model initialization idempotent

This commit is contained in:
Codex
2026-08-15 09:37:46 -07:00
parent fed8fc66dd
commit cf0ecbc188
@@ -33,7 +33,13 @@ services:
- /bin/sh
- -ec
- |
fetch() { test -s "$$2" || curl --fail --location --retry 5 --output "$$2.part" "$$1" && test -s "$$2.part" && mv "$$2.part" "$$2"; }
fetch() {
if [ ! -s "$$2" ]; then
curl --fail --location --retry 5 --output "$$2.part" "$$1"
test -s "$$2.part"
mv "$$2.part" "$$2"
fi
}
fetch https://github.com/open-mmlab/mmdetection/archive/refs/tags/v3.2.0.tar.gz /models/mmdetection-v3.2.0.tar.gz
fetch https://github.com/open-mmlab/mmpose/archive/refs/tags/v1.3.2.tar.gz /models/mmpose-v1.3.2.tar.gz
test -d /models/mmdetection/configs || { mkdir -p /models/mmdetection && tar -xzf /models/mmdetection-v3.2.0.tar.gz --strip-components=1 -C /models/mmdetection; }