Skip to content

Commit 17b7662

Browse files
committed
Small adjustments to make things work on Debian10, remove debug statement
1 parent 75ce850 commit 17b7662

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

gpu_support/add_nvidia_gpu_support.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ do
106106
cuda_compat_urls=$(echo $cuda_compat_urls | cut -d " " -f2-)
107107
latest_driver_version="${latest_cuda_compat_url%-*}"
108108
latest_driver_version="${latest_driver_version##*-}"
109+
# URLs differ for different OSes; check if we already have a number, if not remove string part that is not needed
110+
if [[ ! $latest_driver_version =~ ^[0-9]+$ ]]; then
111+
latest_driver_version="${latest_driver_version##*_}"
112+
fi
109113

110114
install_compat_libs=false
111115
host_injections_dir="/cvmfs/pilot.eessi-hpc.org/host_injections/nvidia"

gpu_support/get_cuda_compatlibs.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ current_dir=$(dirname $(realpath $0))
55
# Get arch type from EESSI environment
66
if [[ -z "${EESSI_CPU_FAMILY}" ]]; then
77
# set up basic environment variables, EasyBuild and Lmod
8-
echo Here!!
98
EESSI_SILENT=1 source /cvmfs/pilot.eessi-hpc.org/versions/2021.12/init/bash
109
fi
1110
eessi_cpu_family="${EESSI_CPU_FAMILY:-x86_64}"
@@ -52,7 +51,7 @@ ver=${ver%.*}
5251
# build URL for CUDA libraries
5352
cuda_url="https://developer.download.nvidia.com/compute/cuda/repos/"${os}${ver}"/"${eessi_cpu_family}"/"
5453
# get all versions in decending order
55-
files=$(curl -s "${cuda_url}" | grep 'cuda-compat' | sed 's/<\/\?[^>]\+>//g' | xargs -n1 | sort -r )
54+
files=$(curl -s "${cuda_url}" | grep 'cuda-compat' | sed 's/<\/\?[^>]\+>//g' | xargs -n1 | /cvmfs/pilot.eessi-hpc.org/latest/compat/linux/${eessi_cpu_family}/bin/sort -r --version-sort )
5655
if [[ -z "${files// }" ]]; then
5756
echo "Could not find any compat lib files under" ${cuda_url}
5857
exit 1

gpu_support/install_cuda_compatlibs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fi
5151
cd $host_injections_dir
5252
cuda_dir=$(basename ${tmpdir}/usr/local/cuda-*)
5353
# TODO: This would prevent error messages if folder already exists, but could be problematic if only some files are missing in destination dir
54+
rm -rf ${cuda_dir}
5455
mv -n ${tmpdir}/usr/local/cuda-* .
5556
rm -r ${tmpdir}
5657

0 commit comments

Comments
 (0)