mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
Handling Import and file not found Error for non-arm devices.
This commit is contained in:
parent
66004e3b83
commit
d10147f478
@ -2,12 +2,13 @@
|
|||||||
# Following Apache License 2.0
|
# Following Apache License 2.0
|
||||||
|
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
from rknnlite.api import RKNNLite
|
|
||||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||||
|
|
||||||
supported_socs = ["rk3566","rk3568","rk3588"]
|
supported_socs = ["rk3566","rk3568","rk3588"]
|
||||||
|
|
||||||
with open('/proc/device-tree/compatible') as f:
|
try:
|
||||||
|
from rknn.api import RKNNLite
|
||||||
|
with open('/proc/device-tree/compatible') as f:
|
||||||
# Keep in mind that this is not in container by default.
|
# Keep in mind that this is not in container by default.
|
||||||
# and this way of checking can't check if the rknpu driver is running or not.
|
# and this way of checking can't check if the rknpu driver is running or not.
|
||||||
device_compatible_str = f.read()
|
device_compatible_str = f.read()
|
||||||
@ -17,7 +18,8 @@ with open('/proc/device-tree/compatible') as f:
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
is_available = False
|
is_available = False
|
||||||
|
except (FileNotFoundError, ImportError):
|
||||||
|
is_available = False
|
||||||
|
|
||||||
|
|
||||||
def initRKNN(rknnModel="./rknnModel/yolov5s.rknn", id=0):
|
def initRKNN(rknnModel="./rknnModel/yolov5s.rknn", id=0):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user