File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,12 @@ function add_fedora_deps() {
400400}
401401
402402function install_cuda() {
403+ # Skip CUDA installation for cross-compilation
404+ if [ " $cross_compile " == 1 ]; then
405+ echo " Skipping CUDA installation for cross-compilation"
406+ return 0
407+ fi
408+
403409 # Check if CUDA is already available
404410 if detect_nvcc_path > /dev/null 2>&1 ; then
405411 return
@@ -482,14 +488,16 @@ function check_version() {
482488 return 1
483489 fi
484490
485- if [[ " $( printf ' %s\n' " $installed_version " " $min_version " | sort -V | head -n1) " = " $min_version " ]] && \
486- [[ " $( printf ' %s\n' " $installed_version " " $max_version " | sort -V | head -n1) " = " $installed_version " ]]; then
487- echo " Installed version is within range"
488- return 0
489- else
490- echo " $package_name version $installed_version is out of range"
491- return 1
491+ # Simplified version comparison using sort -V
492+ if [ " $( printf ' %s\n' " $installed_version " " $min_version " | sort -V | head -n1) " = " $min_version " ]; then
493+ if [ " $max_version " = " inf" ] || [ " $( printf ' %s\n' " $installed_version " " $max_version " | sort -V | head -n1) " = " $installed_version " ]; then
494+ echo " Installed version is within range"
495+ return 0
496+ fi
492497 fi
498+
499+ echo " $package_name version $installed_version is out of range"
500+ return 1
493501}
494502
495503function run_step_deps() {
You can’t perform that action at this time.
0 commit comments