Files
detections/_docs/04_deploy/deploy_scripts.md
Oleksandr Bezdieniezhnykh 2c35e59a77 [AZ-180] Update Jetson deployment documentation and remove obsolete task file
- Added Jetson-specific deployment instructions to `deploy_scripts.md`, detailing prerequisites and service management.
- Updated `deploy_status_report.md` to reflect the completion of the AZ-180 cycle and the readiness of Jetson support.
- Removed outdated task documentation for Jetson Orin Nano support from the todo list.

Made-with: Cursor
2026-04-02 16:58:57 +03:00

2.5 KiB

Deployment Scripts

All scripts are in scripts/ at the project root. Each script is POSIX-compatible (bash with set -euo pipefail), sources .env from the project root, and supports --help.

Script Reference

Script Purpose Key Env Vars
deploy.sh Orchestrates full deployment REGISTRY, IMAGE_TAG, DEPLOY_HOST, DEPLOY_USER
pull-images.sh Pulls Docker images from registry REGISTRY, IMAGE_TAG
start-services.sh Starts the detections container REGISTRY, IMAGE_TAG, LOADER_URL, ANNOTATIONS_URL
stop-services.sh Gracefully stops and removes container
health-check.sh Verifies /health endpoint HEALTH_CHECK_HOST, HEALTH_CHECK_PORT

Usage

Full Deployment

REGISTRY=registry.example.com IMAGE_TAG=a1b2c3d bash scripts/deploy.sh

Remote Deployment (via SSH)

REGISTRY=registry.example.com \
IMAGE_TAG=a1b2c3d \
DEPLOY_HOST=production-server.example.com \
DEPLOY_USER=deploy \
bash scripts/deploy.sh

Rollback

bash scripts/deploy.sh --rollback

Redeploys the previous image tag (saved in .deploy-previous-tag by stop-services.sh).

Local Development

docker compose -f docker-compose.yml up

Or using the e2e compose for testing:

cd e2e && COMPOSE_PROFILES=cpu docker compose -f docker-compose.test.yml up --build

Jetson Orin Nano Deployment (AZ-180)

Jetson deployment uses docker-compose.jetson.yml directly — the standard CPU/GPU scripts are not used on Jetson.

Prerequisites on target Jetson device:

  • JetPack 6.x installed
  • NVIDIA Container Runtime configured (runtime: nvidia support in Docker)
  • docker compose v2+

Start service:

docker compose -f docker-compose.jetson.yml up -d

Stop service:

docker compose -f docker-compose.jetson.yml down

INT8 calibration cache: Upload azaion.int8_calib.cache to the Loader service before first start to enable INT8 precision. If absent, the service falls back to FP16 automatically.

Deployment Flow

deploy.sh
  ├── pull-images.sh    → docker pull
  ├── stop-services.sh  → docker stop (30s grace) + save previous tag
  ├── start-services.sh → docker run
  └── health-check.sh   → curl /health (10 retries, 3s interval)

Environment Variables

All scripts source .env from the project root if it exists. Variables can also be passed directly via the environment. See .env.example for the full list.