Linux & Docker Installation
This guide describes step by step how to install and configure an NVIDIA Jetson Orin Nano for use with the AI-Detector (CowCatcherAI). All steps are fully detailed so that nothing is skipped.
1. Hardware Installation & Flashing the Jetson
2. Installation of Docker & NVIDIA Container Toolkit
Open a terminal on the Jetson and execute the following commands:
sudo apt update
sudo apt install -y docker.io
sudo systemctl enable --now docker
sudo apt install -y nvidia-container-runtime nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker 3. Download AI-Detector Container
Download the correct container for JetPack 6:
sudo docker pull ghcr.io/eschouten/ai-detector:main-jetpack6 4. Creating configuration files
Create the necessary files using the following commands:
touch compose.yml
touch config.json File 1: compose.yml
Open the file with `nano compose.yml`. Paste the following content:
services:
aidetector:
image: "ghcr.io/eschouten/ai-detector:main-jetpack6"
runtime: nvidia
ipc: host
ulimits:
memlock: -1
stack: 67108864
volumes:
- ./config.json:/app/config.json
- ./sprong24.mp4:/app/sprong24.mp4
- ./detections/:/app/detections
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu] File 2: config.json
Open the file with `nano config.json`. Paste the following content and enter your own RTSP details and Telegram token/chat ID. Add more terms if you like, this is the minimal config file:
{
"detectors": [
{
"detection": {
"source": [
"rtsp://admin:YourPassword123@192.168.100.22:554/h264Preview_01_sub"
]
},
"yolo": {
"model": "https://github.com/CowCatcherAI/CowCatcherAI/releases/download/model-V16/cowcatcherV15.pt",
"confidence": 0.84,
"frames_min": 4,
"timeout": 6,
"time_max": 50
},
"exporters": {
"telegram": [
{
"token": "<your_bot_token>",
"chat": "<your_chat_id>",
"alert_every": 5,
"confidence": 0.87
}
],
"disk": {
"directory": "mounts"
}
}
}
]
} 5. Starting and Managing the Container
Start the container:
sudo docker compose up Stop the container:
sudo docker compose down After changes in config.json or compose.yml:
sudo docker compose down[cite: 106]- Save modifications [cite: 107]
sudo docker compose up[cite: 108]
The detection results are saved in the folder: ./detections [cite: 109]