mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
fix getting device from empty list
This commit is contained in:
parent
dcaed0e90f
commit
7029a63166
@ -31,6 +31,9 @@ class LibvaGpuSelector:
|
||||
|
||||
devices = list(filter(lambda d: d.startswith("render"), os.listdir("/dev/dri")))
|
||||
|
||||
if not devices:
|
||||
return "/dev/dri/renderD128"
|
||||
|
||||
if len(devices) < 2:
|
||||
self._selected_gpu = f"/dev/dri/{devices[0]}"
|
||||
return self._selected_gpu
|
||||
|
||||
Loading…
Reference in New Issue
Block a user