Skip to content

Commit

Permalink
add arm64 support for yolov7_reid
Browse files Browse the repository at this point in the history
  • Loading branch information
solderzzc committed Sep 27, 2022
1 parent 2762c09 commit dab1f63
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def get_version() -> str:
return "0.1.35"
return "0.1.36"

install_requires = [
"requests",
Expand Down
3 changes: 0 additions & 3 deletions src/sharpai_hub/commands/yolov7_reid.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ def run(self):
if docker_compose_yml == None:
print('Your platform is not supported, please file an issue on github for feature request: https://github.com/SharpAI/DeepCamera/issues')
exit(-1)
if docker_compose_yml != 'docker-compose-x86.yml':
print('Only support X86 platform, please file an issue on github for feature request: https://github.com/SharpAI/DeepCamera/issues')
exit(-1)
yml_url = f'https://raw.githubusercontent.com/SharpAI/applications/main/yolov7_reid/{docker_compose_yml}'

response=requests.get(yml_url)
Expand Down
23 changes: 21 additions & 2 deletions src/sharpai_hub/utils/check_env.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import io
import os
import subprocess
from shutil import which
import platform
Expand Down Expand Up @@ -29,6 +31,21 @@ def check_if_docker_has_permission():
print('logout/login your account, if there\'s issue still, please reboot')
#print(output)
exit(-1)
def is_raspberrypi():
if os.name != 'posix':
return False
chips = ('BCM2708','BCM2709','BCM2711','BCM2835','BCM2836')
try:
with io.open('/proc/cpuinfo', 'r') as cpuinfo:
for line in cpuinfo:
if line.startswith('Hardware'):
_, value = line.strip().split(':', 1)
value = value.strip()
if value in chips:
return True
except Exception:
pass
return False
def get_docker_compose_arch_filename():
processor = platform.processor()
# print(processor)
Expand All @@ -54,7 +71,9 @@ def get_docker_compose_arch_filename():
docker_compose_yml = 'docker-compose-l4t-r32.6.1.yml'
elif version[0] == '5' and version[1]=='0':
docker_compose_yml = 'docker-compose-l4t-r35.1.0.yml'
else:
print(f'Your platform dose not support yet, please file a bug: {subprocess.getoutput("apt show nvidia-jetpack")}')
elif is_raspberrypi():
docker_compose_yml = 'docker-compose-arm64.yml'
else:
print(f'Your platform dose not support yet, please file a bug: {subprocess.getoutput("apt show nvidia-jetpack")}')

return docker_compose_yml

0 comments on commit dab1f63

Please sign in to comment.