mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-09 01:52:39 +00:00
Update scripts to install cuda/cudnn/torch.
This commit is contained in:
parent
3e2979ec45
commit
ca273828f1
@ -36,6 +36,13 @@ case "$cuda" in
|
||||
# url=https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run
|
||||
url=https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run
|
||||
;;
|
||||
11.3)
|
||||
# url=https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run
|
||||
url=https://developer.download.nvidia.com/compute/cuda/11.3.1/local_installers/cuda_11.3.1_465.19.01_linux.run
|
||||
;;
|
||||
11.5)
|
||||
url=https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run
|
||||
;;
|
||||
*)
|
||||
echo "Unknown cuda version: $cuda"
|
||||
exit 1
|
||||
|
@ -17,42 +17,43 @@
|
||||
case $cuda in
|
||||
10.0)
|
||||
filename=cudnn-10.0-linux-x64-v7.6.5.32.tgz
|
||||
url=http://www.mediafire.com/file/1037lb1vmj9qdtq/cudnn-10.0-linux-x64-v7.6.5.32.tgz/file
|
||||
;;
|
||||
10.1)
|
||||
filename=cudnn-10.1-linux-x64-v8.0.2.39.tgz
|
||||
url=http://www.mediafire.com/file/fnl2wg0h757qhd7/cudnn-10.1-linux-x64-v8.0.2.39.tgz/file
|
||||
;;
|
||||
10.2)
|
||||
filename=cudnn-10.2-linux-x64-v8.0.2.39.tgz
|
||||
url=http://www.mediafire.com/file/sc2nvbtyg0f7ien/cudnn-10.2-linux-x64-v8.0.2.39.tgz/file
|
||||
;;
|
||||
11.0)
|
||||
filename=cudnn-11.0-linux-x64-v8.0.5.39.tgz
|
||||
url=https://www.mediafire.com/file/abyhnls106ko9kp/cudnn-11.0-linux-x64-v8.0.5.39.tgz/file
|
||||
;;
|
||||
11.1)
|
||||
filename=cudnn-11.1-linux-x64-v8.0.5.39.tgz
|
||||
url=https://www.mediafire.com/file/qx55zd65773xonv/cudnn-11.1-linux-x64-v8.0.5.39.tgz/file
|
||||
filename=cudnn-11.1-linux-x64-v8.0.4.30.tgz
|
||||
;;
|
||||
11.3)
|
||||
filename=cudnn-11.3-linux-x64-v8.2.0.53.tgz
|
||||
;;
|
||||
11.5)
|
||||
filename=cudnn-11.3-linux-x64-v8.2.0.53.tgz
|
||||
;;
|
||||
# 11.5)
|
||||
# filename=cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz
|
||||
# ;;
|
||||
*)
|
||||
echo "Unsupported cuda version: $cuda"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
function retry() {
|
||||
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
|
||||
}
|
||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nPlease install 'git-lfs' first."; exit 2; }
|
||||
|
||||
# It is forked from https://github.com/Juvenal-Yescas/mediafire-dl
|
||||
# https://github.com/Juvenal-Yescas/mediafire-dl/pull/2 changes the filename and breaks the CI.
|
||||
# We use a separate fork to keep the link fixed.
|
||||
retry wget https://raw.githubusercontent.com/csukuangfj/mediafire-dl/master/mediafire_dl.py
|
||||
git clone https://huggingface.co/csukuangfj/cudnn
|
||||
cd cudnn
|
||||
git lfs pull --include="$filename"
|
||||
|
||||
sed -i 's/quiet=False/quiet=True/' mediafire_dl.py
|
||||
retry python3 mediafire_dl.py "$url"
|
||||
sudo tar xf ./$filename -C /usr/local
|
||||
rm -v ./$filename
|
||||
sudo tar xf ./$filename --strip-components=1 -C /usr/local/cuda
|
||||
|
||||
# save disk space
|
||||
git lfs prune && cd .. && rm -rf cudnn
|
||||
|
||||
sudo sed -i '59i#define CUDNN_MAJOR 8' /usr/local/cuda/include/cudnn.h
|
||||
|
@ -78,7 +78,7 @@ case ${torch} in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
1.9.0)
|
||||
1.9.*)
|
||||
case ${cuda} in
|
||||
10.2)
|
||||
package="torch==${torch}"
|
||||
@ -91,6 +91,40 @@ case ${torch} in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
1.10.*)
|
||||
case ${cuda} in
|
||||
10.2)
|
||||
package="torch==${torch}"
|
||||
# Leave it empty to use PyPI.
|
||||
url=
|
||||
;;
|
||||
11.1)
|
||||
package="torch==${torch}+cu111"
|
||||
url=https://download.pytorch.org/whl/torch_stable.html
|
||||
;;
|
||||
11.3)
|
||||
package="torch==${torch}+cu113"
|
||||
url=https://download.pytorch.org/whl/torch_stable.html
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
1.11.*)
|
||||
case ${cuda} in
|
||||
10.2)
|
||||
package="torch==${torch}"
|
||||
# Leave it empty to use PyPI.
|
||||
url=
|
||||
;;
|
||||
11.3)
|
||||
package="torch==${torch}+cu113"
|
||||
url=https://download.pytorch.org/whl/torch_stable.html
|
||||
;;
|
||||
11.5)
|
||||
package="torch==${torch}+cu115"
|
||||
url=https://download.pytorch.org/whl/torch_stable.html
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported PyTorch version: ${torch}"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user