mirror of
https://github.com/azaion/detections.git
synced 2026-06-23 15:41:09 +00:00
Push model to docker registry
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -z "${REGISTRY_HOST:-}" ]]; then
|
||||
echo "--- REGISTRY_HOST is not set; skipping Jetson engine artifact pull"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ENGINE_REPOSITORY="${JETSON_ENGINE_REPOSITORY:-$REGISTRY_HOST/azaion/detections-jetson-engine}"
|
||||
BRANCH="${CI_COMMIT_BRANCH:-local}"
|
||||
ENGINE_TAG="${JETSON_ENGINE_TAG:-$(printf '%s' "$BRANCH" | tr -c 'A-Za-z0-9_.-' '-')}"
|
||||
TARGET_DIR="${JETSON_ENGINE_TARGET_DIR:-fixtures/models}"
|
||||
image="$ENGINE_REPOSITORY:$ENGINE_TAG"
|
||||
|
||||
echo "--- Pulling Jetson engine artifact image: $image"
|
||||
if ! docker pull "$image"; then
|
||||
echo "--- Jetson engine artifact image not found; smoke will use ONNX fallback"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cid="$(docker create "$image")"
|
||||
trap 'docker rm -f "$cid" >/dev/null 2>&1 || true' EXIT
|
||||
|
||||
mkdir -p "$TARGET_DIR"
|
||||
docker cp "$cid:/models/." "$TARGET_DIR/"
|
||||
|
||||
echo "--- Installed Jetson engine files:"
|
||||
find "$TARGET_DIR" -maxdepth 1 -type f -name 'azaion*.engine' -print -exec ls -lh {} \;
|
||||
Reference in New Issue
Block a user