mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:46:30 +00:00
fix bug with annotation result gradient stops
add tensorrt engine
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import re
|
||||
import subprocess
|
||||
import psutil
|
||||
|
||||
@@ -42,6 +43,18 @@ cdef class HardwareService:
|
||||
return addr.address.replace('-', '')
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
cdef has_nvidia_gpu():
|
||||
try:
|
||||
output = subprocess.check_output(['nvidia-smi']).decode()
|
||||
match = re.search(r'CUDA Version:\s*([\d.]+)', output)
|
||||
if match:
|
||||
return float(match.group(1)) > 11
|
||||
return False
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return False
|
||||
|
||||
cdef HardwareInfo get_hardware_info(self):
|
||||
if self.is_windows:
|
||||
os_command = (
|
||||
|
||||
Reference in New Issue
Block a user