mirror of
https://github.com/ultralytics/ultralytics
synced 2026-04-21 14:07:18 +00:00
feat: ✨ add option to skip requirements checks via environment variable (#23065)
Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
432efee9ae
commit
7b1ba7cab8
1 changed files with 5 additions and 0 deletions
|
|
@ -418,6 +418,11 @@ def check_requirements(requirements=ROOT.parent / "requirements.txt", exclude=()
|
|||
>>> check_requirements([("onnxruntime", "onnxruntime-gpu"), "numpy"])
|
||||
"""
|
||||
prefix = colorstr("red", "bold", "requirements:")
|
||||
|
||||
if os.environ.get("ULTRALYTICS_SKIP_REQUIREMENTS_CHECKS", "0") == "1":
|
||||
LOGGER.info(f"{prefix} ULTRALYTICS_SKIP_REQUIREMENTS_CHECKS=1 detected, skipping requirements check.")
|
||||
return True
|
||||
|
||||
if isinstance(requirements, Path): # requirements.txt file
|
||||
file = requirements.resolve()
|
||||
assert file.exists(), f"{prefix} {file} not found, check failed."
|
||||
|
|
|
|||
Loading…
Reference in a new issue