Feature/run jetson e2e tests (#4)
ci/woodpecker/push/02-build-push Pipeline was successful

* Run tests

* Run tests

* Run tests

* Run tests

* Added rebuild

* Added files for e2e tests

* Added rebuild

* Added rebuild

* Added biuld TensorRT flag

* Changed to use NumPy 1.x for Jetson

* Make universal invocation

* Make Cython constans

* Changed to prepare onnx

* Changed smoke-test to wait AI conversion

* Added step for model conversion

* Changed to not run step in parallel

* Push model to docker registry

* Push model to docker registry

* Push model to docker registry
This commit is contained in:
Roman Meshko
2026-05-05 21:44:51 +03:00
committed by GitHub
parent a659631151
commit 6ad4b700dd
23 changed files with 501 additions and 112 deletions
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
set -euo pipefail
COMPOSE="${COMPOSE:-docker compose -f docker-compose.test.yml --profile jetson}"
REGISTRY_HOST="${REGISTRY_HOST:?REGISTRY_HOST is required}"
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_.-' '-')}"
OUT_DIR="${JETSON_ENGINE_OUT_DIR:-results/jetson-engine}"
mkdir -p "$OUT_DIR/models"
loader_id="$($COMPOSE ps -q mock-loader)"
if [[ -z "$loader_id" ]]; then
echo "ERROR: mock-loader container is not running"
exit 1
fi
docker cp "$loader_id:/models/models/." "$OUT_DIR/models/"
find "$OUT_DIR/models" -maxdepth 1 -type f ! -name 'azaion*.engine' -delete
engine_count="$(find "$OUT_DIR/models" -maxdepth 1 -type f -name 'azaion*.engine' | wc -l | tr -d ' ')"
if [[ "$engine_count" == "0" ]]; then
echo "ERROR: no converted TensorRT engine found in mock-loader /models/models"
find "$OUT_DIR/models" -maxdepth 2 -type f -print
exit 1
fi
echo "--- Converted TensorRT engine files:"
find "$OUT_DIR/models" -maxdepth 1 -type f -name 'azaion*.engine' -print -exec ls -lh {} \;
image="$ENGINE_REPOSITORY:$ENGINE_TAG"
echo "--- Building Jetson engine artifact image: $image"
docker build -f engine-artifact.Dockerfile -t "$image" "$OUT_DIR/models"
docker push "$image"
if [[ -n "${CI_COMMIT_SHA:-}" ]]; then
sha_tag="$(printf '%s' "$CI_COMMIT_SHA" | cut -c1-12)"
docker tag "$image" "$ENGINE_REPOSITORY:$sha_tag"
docker push "$ENGINE_REPOSITORY:$sha_tag"
fi
echo "--- Published Jetson engine artifact image: $image"