Skip to content

Commit

Permalink
round down to even major ubuntu version
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jan 3, 2024
1 parent f55e960 commit e213add
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion features/src/cuda/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ check_packages \
echo "Downloading CUDA keyring...";

export NVARCH="$(uname -p)";
export OSNAME="$(. /etc/os-release; echo "$ID${VERSION_ID/./}")";
export OSNAME="$(
. /etc/os-release;
major="$(cut -d'.' -f1 <<< "${VERSION_ID}")";
minor="$(cut -d'.' -f2 <<< "${VERSION_ID}")";
echo "$ID$((major - (major % 2)))${minor}";
)";

VERSION="${CUDA_VERSION:-${VERSION:-12.2.0}}";

if [[ "$NVARCH" == aarch64 ]]; then
Expand Down

0 comments on commit e213add

Please sign in to comment.