Skip to content

Commit

Permalink
Fix downloading cudnn files in GitHub actions. (#344)
Browse files Browse the repository at this point in the history
* fix downloading cudnn files in GitHub Actions.

* Download cudnn files without credentials.

* remove extra files.
  • Loading branch information
csukuangfj authored Nov 14, 2020
1 parent c6d658e commit 3c4fe27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ jobs:
shell: bash
run: |
python3 -m pip install --upgrade pip
python3 -m pip install gdown # for downloading cudnn from gdrive
python3 -m pip install wheel twine
python3 -m pip install bs4 requests tqdm
source ./scripts/github_actions/install_torch.sh
./scripts/github_actions/install_torch.sh
python3 -c "import torch; print('torch version:', torch.__version__)"
- name: Download cudnn 8.0
Expand All @@ -81,7 +81,6 @@ jobs:
run: |
./scripts/github_actions/install_cudnn.sh
- name: Configure CMake
shell: bash
run: |
Expand Down
20 changes: 7 additions & 13 deletions scripts/github_actions/install_cudnn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,24 @@
case $cuda in
10.0)
filename=cudnn-10.0-linux-x64-v7.6.5.32.tgz
url="1H1MavvYdQosuhoTtjMpFOWUO1MiBMvC8"
backup_url="https://bit.ly/3pDf2Nk"
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="13_IVjoRJmamBVOgEGSp1Tlr5nClZUqwj"
backup_url="https://bit.ly/2IyDePU"
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="1beVinj771IPuqUsQovgTh5ZMqujBzb64"
backup_url="https://bit.ly/2IDDX2p"
url=http://www.mediafire.com/file/sc2nvbtyg0f7ien/cudnn-10.2-linux-x64-v8.0.2.39.tgz/file
;;
*)
echo "Unsupported cuda version: $cuda"
exit 1
;;
esac

gdown -q --id "$url" --output $filename
if [ ! -e $filename ]; then
echo "Failed to download $filename"
echo "Try $backup_url"
curl -SL -o $filename "$backup_url"
fi

wget https://raw.githubusercontent.com/Juvenal-Yescas/mediafire-dl/master/mediafire-dl.py
python3 mediafire-dl.py "$url"
ls -l
sudo tar xf ./$filename -C /usr/local
ls -l

0 comments on commit 3c4fe27

Please sign in to comment.