mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-10 10:32:16 +00:00
164 lines
5.5 KiB
YAML
164 lines
5.5 KiB
YAML
# Copyright 2021 Xiaomi Corp. (author: Fangjun Kuang)
|
|
|
|
# See ../../LICENSE for clarification regarding multiple authors
|
|
#
|
|
# 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.
|
|
|
|
# refer to https://github.com/actions/starter-workflows/pull/47/files
|
|
|
|
name: build_conda_cuda
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- conda-cuda
|
|
|
|
env:
|
|
KALDIFEAT_BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build_conda_cuda:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-18.04]
|
|
# anaconda does not support 3.9 as of 2021.05.08
|
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
|
# python-version: [3.6, 3.7, 3.8]
|
|
cuda: ["10.1", "10.2", "11.0", "11.1"]
|
|
# from https://download.pytorch.org/whl/torch_stable.html
|
|
#
|
|
# PyTorch 1.9.0 supports: 10.2 (default), 11.1
|
|
# PyTorch 1.8.1 supports: cuda 10.1, 10.2 (default), 11.1
|
|
# PyTorch 1.8.0 supports: cuda 10.1, 10.2 (default), 11.1
|
|
# PyTorch 1.7.x supports: cuda 10.1, 10.2 (default), 11.0, 9.2 (not included in this setup)
|
|
# PyTorch 1.6.0 supports: cuda 10.1, 10.2 (default), 9.2 (not included in this setup)
|
|
# PyTorch 1.5.x supports: cuda 10.1, 10.2 (default), 9.2 (not included in this setup)
|
|
#
|
|
# PyTorch 1.8.x and 1.7.1 support 3.6, 3.7, 3.8, 3.9
|
|
# PyTorch 1.7.0, 1.6.0, and 1.5.x support 3.6, 3.7, 3.8
|
|
#
|
|
# Other PyTorch versions are not tested
|
|
#
|
|
# torch: ["1.5.0", "1.5.1", "1.6.0", "1.7.0", "1.7.1", "1.8.0", "1.8.1"]
|
|
# 1.5.x is removed because there are compilation errors.
|
|
# See
|
|
# https://github.com/csukuangfj/k2/runs/2533830771?check_suite_focus=true
|
|
# and
|
|
# https://github.com/NVIDIA/apex/issues/805
|
|
torch: ["1.6.0", "1.7.0", "1.7.1", "1.8.0", "1.8.1", "1.9.0"]
|
|
exclude:
|
|
# - cuda: "11.0" # exclude 11.0 for [1.5.0, 1.5.1, 1.6.0, 1.8.0, 1.8.1, 1.9.0]
|
|
# torch: "1.5.0"
|
|
# - cuda: "11.0"
|
|
# torch: "1.5.1"
|
|
- cuda: "11.0"
|
|
torch: "1.6.0"
|
|
- cuda: "11.0"
|
|
torch: "1.8.0"
|
|
- cuda: "11.0"
|
|
torch: "1.8.1"
|
|
- cuda: "11.0"
|
|
torch: "1.9.0"
|
|
# - cuda: "11.1" # exclude 11.1 for [1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1]
|
|
# torch: "1.5.0"
|
|
# - cuda: "11.1"
|
|
# torch: "1.5.1"
|
|
- cuda: "11.1"
|
|
torch: "1.6.0"
|
|
- cuda: "11.1"
|
|
torch: "1.7.0"
|
|
- cuda: "11.1"
|
|
torch: "1.7.1"
|
|
- cuda: "10.1" # exclude 10.1 for [1.9.0]
|
|
torch: "1.9.0"
|
|
- python-version: 3.9 # exclude Python 3.9 for [1.5.0, 1.5.1, 1.6.0, 1.7.0]
|
|
torch: "1.5.0"
|
|
- python-version: 3.9
|
|
torch: "1.5.1"
|
|
- python-version: 3.9
|
|
torch: "1.6.0"
|
|
- python-version: 3.9
|
|
torch: "1.7.0"
|
|
|
|
steps:
|
|
# refer to https://github.com/actions/checkout
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install CUDA Toolkit ${{ matrix.cuda }}
|
|
shell: bash -l {0}
|
|
env:
|
|
cuda: ${{ matrix.cuda }}
|
|
run: |
|
|
source ./scripts/github_actions/install_cuda.sh
|
|
echo "CUDA_HOME=${CUDA_HOME}" >> $GITHUB_ENV
|
|
echo "${CUDA_HOME}/bin" >> $GITHUB_PATH
|
|
echo "LD_LIBRARY_PATH=${CUDA_HOME}/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
|
|
|
|
- name: Display NVCC version
|
|
shell: bash -l {0}
|
|
run: |
|
|
which nvcc
|
|
nvcc --version
|
|
|
|
- uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
auto-update-conda: true
|
|
python-version: ${{ matrix.python-version }}
|
|
activate-environment: kaldifeat
|
|
|
|
- name: Display Python version
|
|
shell: bash -l {0}
|
|
run: |
|
|
python3 -c "import sys; print(sys.version)"
|
|
which python3
|
|
|
|
- name: Install conda dependencies
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda install -y -q anaconda-client
|
|
conda install -y -q conda-build
|
|
conda install -y -q bs4 requests tqdm
|
|
conda install -y -q -c pytorch -c conda-forge pytorch=${{ matrix.torch }} cudatoolkit=${{ matrix.cuda }}
|
|
|
|
- name: Display conda info
|
|
shell: bash -l {0}
|
|
run: |
|
|
which conda
|
|
conda env list
|
|
conda info
|
|
nproc
|
|
|
|
- name: Download cudnn 8.0
|
|
shell: bash -l {0}
|
|
env:
|
|
cuda: ${{ matrix.cuda }}
|
|
run: |
|
|
./scripts/github_actions/install_cudnn.sh
|
|
|
|
- name: Build kaldifeat
|
|
shell: bash -l {0}
|
|
env:
|
|
KALDIFEAT_CUDA_VERSION: ${{ matrix.cuda }}
|
|
KALDIFEAT_PYTHON_VERSION: ${{ matrix.python-version}}
|
|
KALDIFEAT_TORCH_VERSION: ${{ matrix.torch }}
|
|
KALDIFEAT_CONDA_TOKEN: ${{ secrets.KALDIFEAT_CONDA_TOKEN}}
|
|
KALDIFEAT_IS_GITHUB_ACTIONS: 1
|
|
KALDIFEAT_IS_FOR_CONDA: 1
|
|
run: |
|
|
export KALDIFEAT_BUILD_TYPE=$KALDIFEAT_BUILD_TYPE
|
|
./scripts/build_conda.sh
|