DeepSpeech/taskcluster/win-build.sh

56 строки
1.4 KiB
Bash
Исходник Обычный вид История

#!/bin/bash
set -xe
2020-01-30 12:18:58 +03:00
package_option=$1
source $(dirname "$0")/tc-tests-utils.sh
2020-06-25 15:44:31 +03:00
source $(dirname "$0")/tf_tc-vars.sh
BAZEL_TARGETS="
//native_client:libdeepspeech.so
"
2020-01-30 12:18:58 +03:00
if [ "${package_option}" = "--cuda" ]; then
BAZEL_ENV_FLAGS="TF_NEED_CUDA=1 ${TF_CUDA_FLAGS}"
BAZEL_BUILD_FLAGS="${BAZEL_CUDA_FLAGS} ${BAZEL_EXTRA_FLAGS} ${BAZEL_OPT_FLAGS}"
PROJECT_NAME="DeepSpeech-GPU"
2020-01-30 12:18:58 +03:00
elif [ "${package_option}" = "--tflite" ]; then
PROJECT_NAME="DeepSpeech-TFLite"
BAZEL_BUILD_FLAGS="--define=runtime=tflite ${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS}"
BAZEL_ENV_FLAGS="TF_NEED_CUDA=0"
else
PROJECT_NAME="DeepSpeech"
2020-01-30 12:18:58 +03:00
BAZEL_BUILD_FLAGS="${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS}"
BAZEL_ENV_FLAGS="TF_NEED_CUDA=0"
fi
SYSTEM_TARGET=host-win
do_bazel_build
2020-01-30 12:18:58 +03:00
if [ "${package_option}" = "--cuda" ]; then
2020-06-25 15:44:31 +03:00
cp ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel-bin/native_client/liblibdeepspeech.so.ifso ${DS_ROOT_TASK}/DeepSpeech/ds/tensorflow/bazel-bin/native_client/libdeepspeech.so.if.lib
fi
2019-03-20 11:16:09 +03:00
export PATH=$PATH:$(cygpath ${ChocolateyInstall})/bin:'/c/Program Files/nodejs/'
do_deepspeech_binary_build
if [ "${runtime}" = "tflite" ]; then
do_deepspeech_python_build "--tflite"
else
2020-01-30 12:18:58 +03:00
do_deepspeech_python_build "${package_option}"
fi
2020-01-30 12:18:58 +03:00
do_deepspeech_nodejs_build "${package_option}"
2019-03-20 11:16:09 +03:00
do_deepspeech_netframework_build
2019-08-21 22:04:20 +03:00
do_deepspeech_netframework_wpf_example_build
do_nuget_build "${PROJECT_NAME}"
shutdown_bazel