fix(unraid): make model initialization idempotent
This commit is contained in:
@@ -33,7 +33,13 @@ services:
|
|||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -ec
|
- -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/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
|
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; }
|
test -d /models/mmdetection/configs || { mkdir -p /models/mmdetection && tar -xzf /models/mmdetection-v3.2.0.tar.gz --strip-components=1 -C /models/mmdetection; }
|
||||||
|
|||||||
Reference in New Issue
Block a user