14 Apr 2023, 15:14

Nachdem ich mir eine CORAL M.2 ACCELERATOR MIT DUAL EDGE TPU und ein Dual Edge TPU Adapter bestellt habe, wurde Frigate auf Proxmox installiert.

Skript von TTeck
Proxmox-Console Ubuntu Lunar installieren:

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/ubuntu.sh)"
  • Use Default Settings? -> Advanced
  • Choose Distribution: -> ubuntu
  • Choose Version -> 23.04 Lunar
  • Choose Type -> 1 Unprivileged
  • Set Disk Size in GB -> 4GB, wenn Videos lokal abgelegt werden sollen erhöhen.
  • Allocate CPU Cores -> min. 2, je mehr Kameras desto mehr Cores
  • Allocate Ram in MiB -> min. 2048, je mehr Kameras desto mehr Speicher
  • Set a Static IPv4 -> besser ist es
  • Disable IPv6? -> besser ist es
  • Enable Root SSH Access? -> nein

FrigateLXC als root:

adduser frigate
adduser frigate sudo
exit

FrigateLXC als User frigate:

sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg 
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo adduser frigate docker
exit

FrigateLXC als User frigate neu anmelden:

docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
sudo systemctl status docker
sudo /lib/systemd/systemd-sysv-install enable docker
mkdir frigate
cd frigate
nano docker-compose.yml

docker-compose.yml:

version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "64mb" # update for your cameras based on calculation above
    cap_add:
      - CAP_PERFMON
    devices:
      - /dev/apex_0:/dev/apex_0
      - /dev/apex_1:/dev/apex_1
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/frigate/frigate/config.yml:/config/config.yml
      - /media/frigate:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"
      - "1935:1935" # RTMP feeds

Achtung ab Frigate 13 muss der komplette Frigate-Pfad angegeben werden nicht die config.yml:

- /home/frigate/frigate:/config
nano config.yml

die minimale config.yml:

mqtt:
  enabled: False

cameras:
  back:
    ffmpeg:
      inputs:
        - path: rtsp://User:PW@192.168.69.162:554/h264Preview_01_main
          roles:
            - detect

    detect:
      enabled: False
      width: 640
      height: 480

docker starten:

docker compose up -d
exit
http://deineIP:5000

Screenshot 2023-04-14 162742.png