diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 65388ab..1eb2ba5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,7 +25,7 @@ on: - master jobs: - pypi: + run_tests: runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/scripts/github_actions/install_cuda.sh b/scripts/github_actions/install_cuda.sh deleted file mode 100755 index 7d023b9..0000000 --- a/scripts/github_actions/install_cuda.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# -# Copyright 2020 Mobvoi Inc. (authors: Fangjun Kuang) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -echo "cuda version: $cuda" - -case "$cuda" in - 10.0) - url=https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux - ;; - 10.1) - # WARNING: there are bugs in - # https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run - # with GCC 7. Please use the following version - url=http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run - ;; - 10.2) - url=http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run - ;; - 11.0) - url=http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda_11.0.2_450.51.05_linux.run - ;; - 11.1) - # 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 - ;; - *) - echo "Unknown cuda version: $cuda" - exit 1 - ;; -esac - -function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) -} - -retry curl -LSs -O $url -filename=$(basename $url) -echo "filename: $filename" -chmod +x ./$filename -sudo ./$filename --toolkit --silent -rm -fv ./$filename - -export CUDA_HOME=/usr/local/cuda -export PATH=$CUDA_HOME/bin:$PATH -export LD_LIBRARY_PATH=$CUDA_HOME/lib:$LD_LIBRARY_PATH -export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH diff --git a/scripts/github_actions/install_cudnn.sh b/scripts/github_actions/install_cudnn.sh deleted file mode 100755 index 853eba5..0000000 --- a/scripts/github_actions/install_cudnn.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# -# Copyright 2020 Mobvoi Inc. (authors: Fangjun Kuang) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -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 - ;; - *) - echo "Unsupported cuda version: $cuda" - exit 1 - ;; -esac - -function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) -} - -# 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 - -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 sed -i '59i#define CUDNN_MAJOR 8' /usr/local/cuda/include/cudnn.h diff --git a/scripts/github_actions/install_torch.sh b/scripts/github_actions/install_torch.sh deleted file mode 100755 index 3ad1717..0000000 --- a/scripts/github_actions/install_torch.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash -# -# Copyright 2020 Mobvoi Inc. (authors: Fangjun Kuang) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -case ${torch} in - 1.5.*) - case ${cuda} in - 10.1) - package="torch==${torch}+cu101" - url=https://download.pytorch.org/whl/torch_stable.html - ;; - 10.2) - package="torch==${torch}" - # Leave url empty to use PyPI. - # torch_stable provides cu92 but we want cu102 - url= - ;; - esac - ;; - 1.6.0) - case ${cuda} in - 10.1) - package="torch==1.6.0+cu101" - url=https://download.pytorch.org/whl/torch_stable.html - ;; - 10.2) - package="torch==1.6.0" - # Leave it empty to use PyPI. - # torch_stable provides cu92 but we want cu102 - url= - ;; - esac - ;; - 1.7.*) - case ${cuda} in - 10.1) - package="torch==${torch}+cu101" - url=https://download.pytorch.org/whl/torch_stable.html - ;; - 10.2) - package="torch==${torch}" - # Leave it empty to use PyPI. - # torch_stable provides cu92 but we want cu102 - url= - ;; - 11.0) - package="torch==${torch}+cu110" - url=https://download.pytorch.org/whl/torch_stable.html - ;; - esac - ;; - 1.8.*) - case ${cuda} in - 10.1) - package="torch==${torch}+cu101" - url=https://download.pytorch.org/whl/torch_stable.html - ;; - 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 - ;; - esac - ;; - 1.9.0) - 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 - ;; - esac - ;; - *) - echo "Unsupported PyTorch version: ${torch}" - exit 1 - ;; -esac - -function retry() { - $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) -} - -if [ x"${url}" == "x" ]; then - retry python3 -m pip install -q $package -else - retry python3 -m pip install -q $package -f $url -fi