Skip to content

Guide d'Installation

Prérequis Hardware

TierCPUCamérasProfilsRAMDisque
SApple M2+, NVIDIA RTX 30606-8Tous8 GB256 GB
AIntel i7-13700 (16C)8Tous16 GB512 GB
BIntel i7-12700, Ryzen 76Tous16 GB256 GB
CIntel i5-12400, Ryzen 54Simples8 GB256 GB
DIntel i5 (sans iGPU)2-3Basiques8 GB128 GB

Hardware tiers

Prérequis Logiciel

  • OS — Ubuntu 22.04 LTS ou supérieur (ou compatible Linux)
  • Docker — 24.0 ou supérieur
  • Docker Compose — 2.20 ou supérieur
  • Ollama — Version 0.1+ (télécharger sur ollama.ai)
  • GPU (optionnel) — CUDA 12.0+ pour accélération

Installation Docker

1. Cloner le Dépôt

bash
git clone https://github.com/gtognisso/cctv-smart.git
cd cctv-smart

2. Copier la Configuration Example

bash
cp config/example.yaml config/cctv_smart.yaml

3. Démarrer les Services

bash
docker compose up -d

4. Télécharger le Modèle Gemma

bash
docker exec ollama ollama pull gemma4:e4b

5. Vérifier la Santé du Système

bash
curl http://localhost:8000/health

Réponse attendue :

json
{"status": "healthy", "components": {"api": "ok", "redis": "ok", "ollama": "ok", "database": "ok"}}

Formats RTSP par Marque

Remplacer <IP>, <USER>, <PASS> selon votre configuration.

Hikvision

rtsp://<USER>:<PASS>@<IP>:554/Streaming/Channels/101
rtsp://<USER>:<PASS>@<IP>:554/Streaming/Channels/102

Dahua

rtsp://<USER>:<PASS>@<IP>:554/cam/realmonitor?channel=0&subtype=0
rtsp://<USER>:<PASS>@<IP>:554/cam/realmonitor?channel=1&subtype=0

Uniview

rtsp://<USER>:<PASS>@<IP>:554/unistream/0
rtsp://<USER>:<PASS>@<IP>:554/unistream/1
rtsp://<USER>:<PASS>@<IP>:554/h264Preview_01_main
rtsp://<USER>:<PASS>@<IP>:554/h264Preview_02_main

Configuration Telegram

1. Créer un Bot Telegram

  1. Ouvrir @BotFather sur Telegram
  2. Envoyer /newbot
  3. Suivre les instructions → obtenir le Token API

2. Obtenir le Chat ID

  1. Ajouter le bot à un groupe ou chat privé
  2. Envoyer un message au bot
  3. Récupérer le Chat ID :
bash
curl "https://api.telegram.org/bot<TOKEN>/getUpdates" | grep chat_id

3. Configurer dans YAML

yaml
alerts:
  telegram:
    enabled: true
    token: "<TOKEN>"
    chat_id: <CHAT_ID>
    send_photo: true

Accès Web

CCTV Smart — Videosurveillance Intelligente pour le Benin