[HW Accel Support]: Multiple Nvidia GPUs #12492
-
Describe the problem you are havingI am trying to get frigate to use my GPU I have 2 Nvidia GPUs in my system. I am running on Proxmox LXC with Docker. I have managed to install the required drivers all is working except its using the wrong GPU. its using the card 0 when I have set it to sue card 1 in my compose file ![]() Version0.13.2-6476F8A Frigate config filemqtt:
enabled: false
detectors:
coral:
type: edgetpu
device: usb
ffmpeg:
hwaccel_args:
- -c:v
- h264_cuvid
go2rtc:
streams:
Front_Garden:
- rtsp://admin:[email protected]:554/Streaming/Channels/301
Front_Garden_sub:
- rtsp://admin:[email protected]:554/Streaming/Channels/302
cameras:
Front_Garden:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Front_Garden_sub
roles:
- detect
- path: rtsp://127.0.0.1:8554/Front_Garden?video=copy&audio=aac
roles:
- record
detect:
width: 640
height: 480
fps: 25
snapshots:
enabled: True
record:
enabled: True
retain:
days: 0
mode: motion
events:
retain:
default: 5
mode: active_objects
pre_capture: 5
post_capture: 8
required_zones:
- Front_Path
motion:
mask:
- 0,51,242,47,255,0,0,0
- 80,480,640,480,640,268,299,122,38,258
zones:
Front_Path:
coordinates: 29,311,235,164,340,168,441,187,491,155,423,120,355,90,325,85,286,71,214,72,162,40,21,70
objects:
- person
filters:
person:
min_area: 5000
max_area: 100000
# threshold: 0.7 docker-compose file or Docker CLI commandversion: "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
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids:
- "1"
capabilities:
- gpu
shm_size: 64mb # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb
volumes:
- /etc/localtime:/etc/localtime:ro
- /frigate/config:/config
- /recordings:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- 5000:5000
- 8554:8554 # RTSP feeds
- 8555:8555/tcp # WebRTC over tcp
- 8555:8555/udp # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: password
networks: {} Relevant log output2024-07-17 18:23:07.988939422 [INFO] Preparing Frigate...
2024-07-17 18:23:08.001495088 [INFO] Starting Frigate...
2024-07-17 18:23:08.953042251 [2024-07-17 18:23:08] frigate.app INFO : Starting Frigate (0.13.2-6476f8a)
2024-07-17 18:23:08.979669084 [2024-07-17 18:23:08] peewee_migrate.logs INFO : Starting migrations
2024-07-17 18:23:08.987697015 [2024-07-17 18:23:08] peewee_migrate.logs INFO : There is nothing to migrate
2024-07-17 18:23:08.987814897 [2024-07-17 18:23:08] frigate.app INFO : Recording process started: 2279
2024-07-17 18:23:08.990152629 [2024-07-17 18:23:08] frigate.app INFO : go2rtc process pid: 89
2024-07-17 18:23:09.012700674 [2024-07-17 18:23:09] frigate.app INFO : Output process started: 2290
2024-07-17 18:23:09.029827177 [2024-07-17 18:23:09] frigate.app INFO : Camera processor started for Front_Garden: 2296
2024-07-17 18:23:09.030764987 [2024-07-17 18:23:09] frigate.app INFO : Capture process started for Front_Garden: 2298
2024-07-17 18:23:11.602811363 [2024-07-17 18:23:09] detector.coral INFO : Starting detection process: 2288
2024-07-17 18:23:11.602859284 [2024-07-17 18:23:09] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2024-07-17 18:23:11.606323241 [2024-07-17 18:23:11] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found FFprobe output from your cameran/a Operating systemProxmox Install methodDocker Compose Network connectionWired Camera make and modelHikvision Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Answered by
NickM-27
Jul 17, 2024
Replies: 1 comment 2 replies
-
I see a few issues in the config
as far as this issue, remove |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
sohail579
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see a few issues in the config
as far as this issue, remove
privileged
from the container