mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-09 01:52:39 +00:00
* Add nightly tests. * Fix CI tests. * Install numpy in CI. * Add nightly ubuntu cpu tests. * add nightly tests for macos * Fix CI for macOS. * Support building CPU conda packages for macOS and Ubuntu. * Disable building conda packages for macOS. * Add tests for conda packages. * Revert "Disable building conda packages for macOS." This reverts commit 9c3f6ebe98b390cfd13314686ab6a518a7ad3482. * Disable building conda packages for macOS. * Add tests for conda packages. * Enable all tests. * Run tests automatically. * Add windows cuda tests. * Fix errors. * Minor fixes. * Download cudnn for windows. * Fix installing cuDNN for windows. * Minor fixes. * Fix using cuDNN. * Typo fixes. * Update readme. * Minor fixes. * small fixes.
82 lines
2.4 KiB
Bash
Executable File
82 lines
2.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright 2021 Xiaomi Corp. (author: 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.
|
|
|
|
# The following environment variables are supposed to be set by users
|
|
#
|
|
# - KALDIFEAT_TORCH_VERSION
|
|
# The PyTorch version. Example:
|
|
#
|
|
# export KALDIFEAT_TORCH_VERSION=1.7.1
|
|
#
|
|
# Defaults to 1.7.1 if not set.
|
|
#
|
|
# - KALDIFEAT_CONDA_TOKEN
|
|
# If not set, auto upload to anaconda.org is disabled.
|
|
#
|
|
# Its value is from https://anaconda.org/kaldifeat/settings/access
|
|
# (You need to login as user kaldifeat to see its value)
|
|
#
|
|
# - KALDIFEAT_BUILD_TYPE
|
|
# If not set, defaults to Release.
|
|
|
|
set -e
|
|
export CONDA_BUILD=1
|
|
|
|
cur_dir=$(cd $(dirname $BASH_SOURCE) && pwd)
|
|
kaldifeat_dir=$(cd $cur_dir/.. && pwd)
|
|
|
|
cd $kaldifeat_dir
|
|
|
|
export KALDIFEAT_ROOT_DIR=$kaldifeat_dir
|
|
echo "KALDIFEAT_ROOT_DIR: $KALDIFEAT_ROOT_DIR"
|
|
|
|
KALDIFEAT_PYTHON_VERSION=$(python3 -c "import sys; print(sys.version[:3])")
|
|
|
|
if [ -z $KALDIFEAT_TORCH_VERSION ]; then
|
|
echo "env var KALDIFEAT_TORCH_VERSION is not set, defaults to 1.7.1"
|
|
KALDIFEAT_TORCH_VERSION=1.7.1
|
|
fi
|
|
|
|
if [ -z $KALDIFEAT_BUILD_TYPE ]; then
|
|
echo "env var KALDIFEAT_BUILD_TYPE is not set, defaults to Release"
|
|
KALDIFEAT_BUILD_TYPE=Release
|
|
fi
|
|
|
|
export KALDIFEAT_IS_FOR_CONDA=1
|
|
|
|
# Example value: 3.8
|
|
export KALDIFEAT_PYTHON_VERSION
|
|
|
|
# Example value: 1.7.1
|
|
export KALDIFEAT_TORCH_VERSION
|
|
|
|
export KALDIFEAT_BUILD_TYPE
|
|
|
|
if [ ! -z $KALDIFEAT_IS_GITHUB_ACTIONS ]; then
|
|
export KALDIFEAT_IS_GITHUB_ACTIONS
|
|
conda remove -q pytorch
|
|
conda clean -q -a
|
|
else
|
|
export KALDIFEAT_IS_GITHUB_ACTIONS=0
|
|
fi
|
|
|
|
if [ -z $KALDIFEAT_CONDA_TOKEN ]; then
|
|
echo "Auto upload to anaconda.org is disabled since KALDIFEAT_CONDA_TOKEN is not set"
|
|
conda build --no-test --no-anaconda-upload -c pytorch -c conda-forge ./scripts/conda-cpu/kaldifeat
|
|
else
|
|
conda build --no-test -c pytorch -c conda-forge --token $KALDIFEAT_CONDA_TOKEN ./scripts/conda-cpu/kaldifeat
|
|
fi
|