Skip to content

Commit dab1f63

Browse files
committed
add arm64 support for yolov7_reid
1 parent 2762c09 commit dab1f63

3 files changed

Lines changed: 22 additions & 6 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
def get_version() -> str:
5-
return "0.1.35"
5+
return "0.1.36"
66

77
install_requires = [
88
"requests",

src/sharpai_hub/commands/yolov7_reid.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ def run(self):
160160
if docker_compose_yml == None:
161161
print('Your platform is not supported, please file an issue on github for feature request: https://github.com/SharpAI/DeepCamera/issues')
162162
exit(-1)
163-
if docker_compose_yml != 'docker-compose-x86.yml':
164-
print('Only support X86 platform, please file an issue on github for feature request: https://github.com/SharpAI/DeepCamera/issues')
165-
exit(-1)
166163
yml_url = f'https://raw.githubusercontent.com/SharpAI/applications/main/yolov7_reid/{docker_compose_yml}'
167164

168165
response=requests.get(yml_url)

src/sharpai_hub/utils/check_env.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import io
2+
import os
13
import subprocess
24
from shutil import which
35
import platform
@@ -29,6 +31,21 @@ def check_if_docker_has_permission():
2931
print('logout/login your account, if there\'s issue still, please reboot')
3032
#print(output)
3133
exit(-1)
34+
def is_raspberrypi():
35+
if os.name != 'posix':
36+
return False
37+
chips = ('BCM2708','BCM2709','BCM2711','BCM2835','BCM2836')
38+
try:
39+
with io.open('/proc/cpuinfo', 'r') as cpuinfo:
40+
for line in cpuinfo:
41+
if line.startswith('Hardware'):
42+
_, value = line.strip().split(':', 1)
43+
value = value.strip()
44+
if value in chips:
45+
return True
46+
except Exception:
47+
pass
48+
return False
3249
def get_docker_compose_arch_filename():
3350
processor = platform.processor()
3451
# print(processor)
@@ -54,7 +71,9 @@ def get_docker_compose_arch_filename():
5471
docker_compose_yml = 'docker-compose-l4t-r32.6.1.yml'
5572
elif version[0] == '5' and version[1]=='0':
5673
docker_compose_yml = 'docker-compose-l4t-r35.1.0.yml'
57-
else:
58-
print(f'Your platform dose not support yet, please file a bug: {subprocess.getoutput("apt show nvidia-jetpack")}')
74+
elif is_raspberrypi():
75+
docker_compose_yml = 'docker-compose-arm64.yml'
76+
else:
77+
print(f'Your platform dose not support yet, please file a bug: {subprocess.getoutput("apt show nvidia-jetpack")}')
5978

6079
return docker_compose_yml

0 commit comments

Comments
 (0)