ultralytics 8.3.63 IMX500 sudo install fix (#18714)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
309f5cafc1
commit
f777b63c8b
4 changed files with 29 additions and 5 deletions
|
|
@ -782,6 +782,18 @@ def cuda_is_available() -> bool:
|
|||
return cuda_device_count() > 0
|
||||
|
||||
|
||||
def is_sudo_available() -> bool:
|
||||
"""
|
||||
Check if the sudo command is available in the environment.
|
||||
|
||||
Returns:
|
||||
bool: True if the sudo command is available, False otherwise.
|
||||
"""
|
||||
if WINDOWS:
|
||||
return False
|
||||
return subprocess.run(["sudo", "--version"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0
|
||||
|
||||
|
||||
# Run checks and define constants
|
||||
check_python("3.8", hard=False, verbose=True) # check python version
|
||||
check_torchvision() # check torch-torchvision compatibility
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue