Files
detections/scripts/start-services.sh
T
Oleksandr Bezdieniezhnykh be4cab4fcb [AZ-178] Implement streaming video detection endpoint
- Added `/detect/video` endpoint for true streaming video detection, allowing inference to start as upload bytes arrive.
- Introduced `run_detect_video_stream` method in the inference module to handle video processing from a file-like object.
- Updated media hashing to include a new function for computing hashes directly from files with minimal I/O.
- Enhanced documentation to reflect changes in video processing and API behavior.

Made-with: Cursor
2026-04-01 03:11:43 +03:00

47 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
if [ -f "$PROJECT_ROOT/.env" ]; then
set -a
source "$PROJECT_ROOT/.env"
set +a
fi
REGISTRY="${REGISTRY:?REGISTRY is required}"
IMAGE_TAG="${IMAGE_TAG:?IMAGE_TAG is required}"
LOADER_URL="${LOADER_URL:-http://loader:8080}"
ANNOTATIONS_URL="${ANNOTATIONS_URL:-http://annotations:8080}"
usage() {
echo "Usage: $0 [--help]"
echo "Start Azaion.Detections service container."
exit 0
}
for arg in "$@"; do
case "$arg" in
--help) usage ;;
esac
done
IMAGE="${REGISTRY}/azaion/detections-cpu:${IMAGE_TAG}"
CONTAINER_NAME="azaion-detections"
echo "Starting $CONTAINER_NAME from $IMAGE ..."
docker run -d \
--name "$CONTAINER_NAME" \
--restart unless-stopped \
-p 8080:8080 \
-e LOADER_URL="$LOADER_URL" \
-e ANNOTATIONS_URL="$ANNOTATIONS_URL" \
-v "$(pwd)/classes.json:/app/classes.json:ro" \
--shm-size=512m \
--memory=4g \
"$IMAGE"
echo "Container $CONTAINER_NAME started."