-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoinstall TensorRT if missing #7537
Conversation
May resolve #7464
except Exception: | ||
s = f"\n{prefix} tensorrt not found and is required by YOLOv5" | ||
LOGGER.info(f"{s}, attempting auto-update...") | ||
r = '-U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @glenn-jocher , These wheels only works on Linux operating system and x86_64 CPU architecture with Python versions 3.6 to 3.9 and CUDA 11.x. See https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing-pip for more details. Many users use TensorRT on Windows, perhaps some explanations should be added here to prevent user annoyance when using it, such as #7009 (comment) .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhiqwang good point! I can't programmatically check the CUDA version, but we can check OS before install. I'll make a PR. The Python version requirement is already met as YOLOv5 requires 3.7 (may also work with 3.6, but no longer supported).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May partially resolve concerns in #7537 (comment)
May partially resolve concerns in #7537 (comment)
* Autoinstall TensorRT if missing May resolve ultralytics#7464 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update export.py * Update export.py * Update export.py * Update export.py Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
May partially resolve concerns in ultralytics#7537 (comment)
* Autoinstall TensorRT if missing May resolve ultralytics#7464 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update export.py * Update export.py * Update export.py * Update export.py Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
May partially resolve concerns in ultralytics#7537 (comment)
May help resolve #7464
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Enhanced error handling and auto-update for TensorRT in YOLOv5 export script.
π Key Changes
π― Purpose & Impact