The key changes made in the updated installation script~:
Refactoring and Simplification: The updated script has been refactored for better readability and maintainability. Functions like get_installed_version and install_package are introduced to reduce code repetition and make the script more modular.
Version Checks and Updates:
The tensorrt package version has been updated from 9.0.1.post11.dev4 to 9.3.0.post12.dev1. This change indicates a significant version update, possibly including new features, bug fixes, and performance improvements.
The CUDA Deep Neural Network library (nvidia-cudnn-cu11) dependency has been replaced with nvidia-cudnn-cu12 in the updated script, suggesting a move to support newer CUDA versions (cu12 instead of cu11). However, there seems to be a discrepancy in the version handling (8.9.7.29 vs. 8.9.6.50) that might be a typo or an intentional downgrade for compatibility reasons.
Improved Package Management:
The updated script includes more sophisticated logic for managing package installations, including handling uninstallation of previous versions if needed, before installing a new version. This is especially evident in the handling of the tensorrt and nvidia-cudnn-cu12 packages.
The addition of no_cache_dir=True to all install_package calls to ensure the latest versions are fetched and to avoid potential conflicts with cached packages.
Simplified Dependency Handling:
The dependencies for ONNX Graph Surgeon and Polygraphy are handled more straightforwardly in the updated script, with specific versions for dependent packages like protobuf.
Error Handling and Robustness: The introduction of the get_installed_version function allows for more robust error handling by checking if a package is installed and obtaining its version before attempting to install or uninstall. This reduces the risk of errors during the installation process.
The key changes made in the updated installation script~:
Refactoring and Simplification: The updated script has been refactored for better readability and maintainability. Functions like
get_installed_version
andinstall_package
are introduced to reduce code repetition and make the script more modular.Version Checks and Updates:
tensorrt
package version has been updated from9.0.1.post11.dev4
to9.3.0.post12.dev1
. This change indicates a significant version update, possibly including new features, bug fixes, and performance improvements.nvidia-cudnn-cu11
) dependency has been replaced withnvidia-cudnn-cu12
in the updated script, suggesting a move to support newer CUDA versions (cu12
instead ofcu11
). However, there seems to be a discrepancy in the version handling (8.9.7.29
vs.8.9.6.50
) that might be a typo or an intentional downgrade for compatibility reasons.Improved Package Management:
tensorrt
andnvidia-cudnn-cu12
packages.no_cache_dir=True
to allinstall_package
calls to ensure the latest versions are fetched and to avoid potential conflicts with cached packages.Simplified Dependency Handling:
protobuf
.Error Handling and Robustness: The introduction of the
get_installed_version
function allows for more robust error handling by checking if a package is installed and obtaining its version before attempting to install or uninstall. This reduces the risk of errors during the installation process.