parent
c49ff17f50
commit
5fdd77d24e
@ -14,10 +14,16 @@ build:
|
||||
>
|
||||
true
|
||||
git_lfs:
|
||||
>
|
||||
export PATH=${system.homedir.linux}/bin:$PATH &&
|
||||
wget https://github.com/git-lfs/git-lfs/releases/download/v2.3.1/git-lfs-linux-amd64-2.3.1.tar.gz -O - | tar -C /tmp -zxf - &&
|
||||
PREFIX=${system.homedir.linux}/ /tmp/git-lfs-2.3.1/install.sh
|
||||
linux:
|
||||
>
|
||||
export PATH=${system.homedir.linux}/bin:$PATH &&
|
||||
wget https://github.com/git-lfs/git-lfs/releases/download/v2.3.1/git-lfs-linux-amd64-2.3.1.tar.gz -O - | tar -C /tmp -zxf - &&
|
||||
PREFIX=${system.homedir.linux}/ /tmp/git-lfs-2.3.1/install.sh
|
||||
osx:
|
||||
>
|
||||
export PATH=$TASKCLUSTER_TASK_DIR/bin:$PATH &&
|
||||
wget https://github.com/git-lfs/git-lfs/releases/download/v2.3.1/git-lfs-darwin-amd64-2.3.1.tar.gz -O - | tar -C $TASKCLUSTER_TASK_DIR/ -zxf - &&
|
||||
mkdir -p $TASKCLUSTER_TASK_DIR/bin/ && cp $TASKCLUSTER_TASK_DIR/git-lfs-2.3.1/git-lfs $TASKCLUSTER_TASK_DIR/bin/ && git lfs install --local && git lfs pull
|
||||
scripts:
|
||||
build: ''
|
||||
package: ''
|
||||
|
@ -10,6 +10,21 @@ nodejs:
|
||||
prep_7: 'echo "deb http://deb.nodesource.com/node_7.x trusty main" > /etc/apt/sources.list.d/nodesource.list && wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -'
|
||||
prep_8: 'echo "deb http://deb.nodesource.com/node_8.x trusty main" > /etc/apt/sources.list.d/nodesource.list && wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -'
|
||||
prep_9: 'echo "deb http://deb.nodesource.com/node_9.x trusty main" > /etc/apt/sources.list.d/nodesource.list && wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -'
|
||||
brew:
|
||||
# Using 'nvm' from homebrew results in installing v0.33.6 which seems to
|
||||
# suffer from a bug making it unable to work as of now:
|
||||
# https://github.com/creationix/nvm/issues/1652
|
||||
#
|
||||
# Documented workaround is to rely on 0.33.4 (bug seems to have been
|
||||
# introduced by 0.33.5).
|
||||
setup: 'install_local_homebrew "node-ds-test" && install_pkg_local_homebrew "sox" && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | NVM_DIR=$TASKCLUSTER_TASK_DIR/.nvm/ bash && source $TASKCLUSTER_TASK_DIR/.nvm/nvm.sh'
|
||||
env: 'export EXTRA_ENV="PATH=$TASKCLUSTER_TASK_DIR/node-ds-test.brew/bin/:$PATH"'
|
||||
prep_4: 'nvm install 4.8.6 && nvm use 4.8.6'
|
||||
prep_5: 'nvm install 5.12.0 && nvm use 5.12.0'
|
||||
prep_6: 'nvm install 6.12.0 && nvm use 6.12.0'
|
||||
prep_7: 'nvm install 7.10.1 && nvm use 7.10.1'
|
||||
prep_8: 'nvm install 8.9.1 && nvm use 8.9.1'
|
||||
prep_9: 'nvm install 9.2.0 && nvm use 9.2.0'
|
||||
## swig -javascript requires swig >= 3.0.7 (14.04 provides 2.0.11)
|
||||
## force 3.0.10 for nodejs V8 API compatibility
|
||||
swig:
|
||||
@ -32,6 +47,11 @@ patch -d $TASKCLUSTER_TASK_DIR/homebrew/Cellar/swig/3.0.12/share/swig/3.0.12/ -p
|
||||
else
|
||||
echo "NO PATCH NEEDED";
|
||||
fi)'
|
||||
cpp:
|
||||
brew:
|
||||
setup: 'install_local_homebrew "cpp-ds-test"'
|
||||
packages: 'install_pkg_local_homebrew "sox"'
|
||||
env: 'export EXTRA_ENV="DYLD_LIBRARY_PATH=$LOCAL_HOMEBREW_DIRECTORY/lib/:$DYLD_LIBRARY_PATH"'
|
||||
system:
|
||||
username: 'build-user'
|
||||
homedir:
|
||||
|
13
taskcluster/test-cpp-darwin-amd64-opt.yml
Normal file
13
taskcluster/test-cpp-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,13 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "darwin-amd64-cpu-opt"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
system_setup:
|
||||
>
|
||||
${cpp.brew.setup} && ${cpp.brew.packages} && ${cpp.brew.env}
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-cpp-ds-tests.sh"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU C++ tests"
|
||||
description: "Testing DeepSpeech C++ for OSX/AMD64, CPU only, optimized version"
|
67
taskcluster/test-darwin-opt-base.tyml
Normal file
67
taskcluster/test-darwin-opt-base.tyml
Normal file
@ -0,0 +1,67 @@
|
||||
$if: 'event.event != "push"'
|
||||
then:
|
||||
taskId: ${taskcluster.taskId}
|
||||
provisionerId: ${taskcluster.generic.provisionerId}
|
||||
workerType: ${taskcluster.generic.workerType}
|
||||
taskGroupId: ${taskcluster.taskGroupId}
|
||||
schedulerId: ${taskcluster.schedulerId}
|
||||
dependencies:
|
||||
$map: { $eval: build.dependencies }
|
||||
each(b):
|
||||
$eval: as_slugid(b)
|
||||
created: { $fromNow: '0 sec' }
|
||||
deadline: { $fromNow: '1 day' }
|
||||
expires: { $fromNow: '7 days' }
|
||||
|
||||
extra:
|
||||
github:
|
||||
{ $eval: taskcluster.github_events.pull_request }
|
||||
|
||||
routes:
|
||||
- "notify.irc-channel.${notifications.irc}.on-exception"
|
||||
- "notify.irc-channel.${notifications.irc}.on-failed"
|
||||
|
||||
scopes: [
|
||||
"queue:route:notify.irc-channel.*",
|
||||
]
|
||||
|
||||
payload:
|
||||
maxRunTime: { $eval: to_int(build.maxRunTime) }
|
||||
|
||||
env:
|
||||
$let:
|
||||
training: { $eval: as_slugid("test-training-linux-amd64-py27-opt") }
|
||||
darwin_amd64_build: { $eval: as_slugid("darwin-amd64-cpu-opt") }
|
||||
node_package: { $eval: as_slugid("node-package") }
|
||||
in:
|
||||
TENSORFLOW_WHEEL: ${build.python_wheel}
|
||||
DEEPSPEECH_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${darwin_amd64_build}/artifacts/public
|
||||
DEEPSPEECH_NODEJS: https://queue.taskcluster.net/v1/task/${node_package}/artifacts/public
|
||||
DEEPSPEECH_TEST_MODEL: https://queue.taskcluster.net/v1/task/${training}/artifacts/public/output_graph.pb
|
||||
DEEPSPEECH_PROD_MODEL: https://s3.amazonaws.com/deep-speech/output_graph.pb
|
||||
|
||||
command:
|
||||
- - "/bin/bash"
|
||||
- "--login"
|
||||
- "-cxe"
|
||||
- $let:
|
||||
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
||||
installGitlfs: { $eval: strip(str(build.git_lfs.osx)) }
|
||||
in: >
|
||||
export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" &&
|
||||
export TASKCLUSTER_TASK_DIR="$(pwd)" &&
|
||||
export TASKCLUSTER_TMP_DIR="$TASKCLUSTER_TASK_DIR/tmp" &&
|
||||
export LC_ALL=C &&
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.10 &&
|
||||
env &&
|
||||
git clone --quiet ${event.head.repo.url} $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/ &&
|
||||
cd $TASKCLUSTER_TASK_DIR/DeepSpeech/ds && git checkout --quiet ${event.head.sha} && ${installGitlfs} &&
|
||||
cd $TASKCLUSTER_TASK_DIR &&
|
||||
source $TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-brew-tests.sh && ${extraSystemSetup} &&
|
||||
/bin/bash ${build.args.tests_cmdline}
|
||||
|
||||
metadata:
|
||||
name: ${build.metadata.name}
|
||||
description: ${build.metadata.description}
|
||||
owner: ${event.head.user.email}
|
||||
source: ${event.head.repo.url}
|
@ -51,7 +51,7 @@ then:
|
||||
- "-cxe"
|
||||
- $let:
|
||||
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
||||
installGitlfs: { $eval: strip(str(build.git_lfs)) }
|
||||
installGitlfs: { $eval: strip(str(build.git_lfs.linux)) }
|
||||
in: >
|
||||
apt-get -qq update && apt-get -qq -y install git pixz libsox2 wget && ${extraSystemSetup} &&
|
||||
adduser --system --home ${system.homedir.linux} ${system.username} &&
|
||||
|
13
taskcluster/test-nodejs_4x-darwin-amd64-opt.yml
Normal file
13
taskcluster/test-nodejs_4x-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,13 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "node-package"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
system_setup:
|
||||
>
|
||||
${nodejs.brew.setup} && ${nodejs.brew.prep_4} && ${nodejs.brew.env}
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-node-tests.sh 4.x"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU NodeJS 4.x tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on NodeJS v4.x, CPU only, optimized version"
|
13
taskcluster/test-nodejs_5x-darwin-amd64-opt.yml
Normal file
13
taskcluster/test-nodejs_5x-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,13 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "node-package"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
system_setup:
|
||||
>
|
||||
${nodejs.brew.setup} && ${nodejs.brew.prep_5} && ${nodejs.brew.env}
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-node-tests.sh 5.x"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU NodeJS 5.x tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on NodeJS v5.x, CPU only, optimized version"
|
13
taskcluster/test-nodejs_6x-darwin-amd64-opt.yml
Normal file
13
taskcluster/test-nodejs_6x-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,13 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "node-package"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
system_setup:
|
||||
>
|
||||
${nodejs.brew.setup} && ${nodejs.brew.prep_6} && ${nodejs.brew.env}
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-node-tests.sh 6.x"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU NodeJS 6.x tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on NodeJS v6.x, CPU only, optimized version"
|
13
taskcluster/test-nodejs_7x-darwin-amd64-opt.yml
Normal file
13
taskcluster/test-nodejs_7x-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,13 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "node-package"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
system_setup:
|
||||
>
|
||||
${nodejs.brew.setup} && ${nodejs.brew.prep_7} && ${nodejs.brew.env}
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-node-tests.sh 7.x"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU NodeJS 7.x tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on NodeJS v7.x, CPU only, optimized version"
|
13
taskcluster/test-nodejs_8x-darwin-amd64-opt.yml
Normal file
13
taskcluster/test-nodejs_8x-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,13 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "node-package"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
system_setup:
|
||||
>
|
||||
${nodejs.brew.setup} && ${nodejs.brew.prep_8} && ${nodejs.brew.env}
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-node-tests.sh 8.x"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU NodeJS 8.x tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on NodeJS v8.x, CPU only, optimized version"
|
13
taskcluster/test-nodejs_9x-darwin-amd64-opt.yml
Normal file
13
taskcluster/test-nodejs_9x-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,13 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "node-package"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
system_setup:
|
||||
>
|
||||
${nodejs.brew.setup} && ${nodejs.brew.prep_9} && ${nodejs.brew.env}
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-node-tests.sh 9.x"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU NodeJS 9.x tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on NodeJS v9.x, CPU only, optimized version"
|
10
taskcluster/test-python_27-darwin-amd64-opt.yml
Normal file
10
taskcluster/test-python_27-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,10 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "darwin-amd64-cpu-opt"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-python-tests.sh 2.7.13"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU Python v2.7 tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on Python v2.7, CPU only, optimized version"
|
10
taskcluster/test-python_34-darwin-amd64-opt.yml
Normal file
10
taskcluster/test-python_34-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,10 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "darwin-amd64-cpu-opt"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-python-tests.sh 3.4.6"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU Python v3.4 tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on Python v3.4, CPU only, optimized version"
|
10
taskcluster/test-python_35-darwin-amd64-opt.yml
Normal file
10
taskcluster/test-python_35-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,10 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "darwin-amd64-cpu-opt"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-python-tests.sh 3.5.3"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU Python v3.5 tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on Python v3.5, CPU only, optimized version"
|
10
taskcluster/test-python_36-darwin-amd64-opt.yml
Normal file
10
taskcluster/test-python_36-darwin-amd64-opt.yml
Normal file
@ -0,0 +1,10 @@
|
||||
build:
|
||||
template_file: test-darwin-opt-base.tyml
|
||||
dependencies:
|
||||
- "darwin-amd64-cpu-opt"
|
||||
- "test-training-linux-amd64-py27-opt"
|
||||
args:
|
||||
tests_cmdline: "$TASKCLUSTER_TASK_DIR/DeepSpeech/ds/tc-python-tests.sh 3.6.2"
|
||||
metadata:
|
||||
name: "DeepSpeech OSX AMD64 CPU Python v3.6 tests"
|
||||
description: "Testing DeepSpeech for OSX/AMD64 on Python v3.6.2, CPU only, optimized version"
|
73
tc-brew-tests.sh
Normal file
73
tc-brew-tests.sh
Normal file
@ -0,0 +1,73 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
OS=$(uname)
|
||||
if [ "${OS}" != "Darwin" ]; then
|
||||
echo "This should only run on OSX."
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
install_local_homebrew()
|
||||
{
|
||||
LOCAL_HOMEBREW_PREFIX=$1
|
||||
|
||||
if [ -z "${TASKCLUSTER_TASK_DIR}" ]; then
|
||||
echo "No TASKCLUSTER_TASK_DIR, aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${LOCAL_HOMEBREW_PREFIX}" ]; then
|
||||
echo "No LOCAL_HOMEBREW_PREFIX, aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for suffix in .brew .cache .logs;
|
||||
do
|
||||
if [ -d "${TASKCLUSTER_TASK_DIR}/${LOCAL_HOMEBREW_PREFIX}${suffix}/" ]; then
|
||||
echo "Directory ${TASKCLUSTER_TASK_DIR}/${LOCAL_HOMEBREW_PREFIX}${suffix} already exists, aborting"
|
||||
exit 1
|
||||
fi
|
||||
done;
|
||||
|
||||
export LOCAL_HOMEBREW_DIRECTORY="${TASKCLUSTER_TASK_DIR}/${LOCAL_HOMEBREW_PREFIX}.brew"
|
||||
export HOMEBREW_LOGS="${TASKCLUSTER_TASK_DIR}/${LOCAL_HOMEBREW_PREFIX}.logs"
|
||||
export HOMEBREW_CACHE="${TASKCLUSTER_TASK_DIR}/${LOCAL_HOMEBREW_PREFIX}.cache"
|
||||
|
||||
mkdir -p "${LOCAL_HOMEBREW_DIRECTORY}"
|
||||
mkdir -p "${HOMEBREW_CACHE}"
|
||||
|
||||
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C "${LOCAL_HOMEBREW_DIRECTORY}"
|
||||
export PATH=${LOCAL_HOMEBREW_DIRECTORY}/bin:$PATH
|
||||
|
||||
if [ ! -x "${LOCAL_HOMEBREW_DIRECTORY}/bin/brew" ]; then
|
||||
echo "No brew binary under ${LOCAL_HOMEBREW_DIRECTORY}, aborting"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
echo "local brew list (should be empty) ..."
|
||||
brew list
|
||||
|
||||
echo "local brew prefix ..."
|
||||
local_prefix=$(brew --prefix)
|
||||
echo "${local_prefix}"
|
||||
|
||||
if [ "${LOCAL_HOMEBREW_DIRECTORY}" != "${local_prefix}" ]; then
|
||||
echo "Weird state:"
|
||||
echo "LOCAL_HOMEBREW_DIRECTORY=${LOCAL_HOMEBREW_DIRECTORY}"
|
||||
echo "local_prefix=${local_prefix}"
|
||||
exit 1
|
||||
fi;
|
||||
}
|
||||
|
||||
install_pkg_local_homebrew()
|
||||
{
|
||||
pkg=$1
|
||||
|
||||
if [ ! -x "${LOCAL_HOMEBREW_DIRECTORY}/bin/brew" ]; then
|
||||
echo "Cannot install $pkg: no brew binary under ${LOCAL_HOMEBREW_DIRECTORY}, aborting"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
(brew list --versions ${pkg} && brew upgrade ${pkg}) || brew install ${pkg}
|
||||
}
|
@ -7,7 +7,7 @@ source $(dirname "$0")/tc-tests-utils.sh
|
||||
model_source=${DEEPSPEECH_PROD_MODEL}
|
||||
model_name=$(basename "${model_source}")
|
||||
|
||||
download_material "/tmp/ds"
|
||||
download_material "${TASKCLUSTER_TMP_DIR}/ds"
|
||||
|
||||
phrase_pbmodel_withlm=$(LD_LIBRARY_PATH=/tmp/ds/:$LD_LIBRARY_PATH /tmp/ds/deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_pbmodel_withlm=$(LD_LIBRARY_PATH=${TASKCLUSTER_TMP_DIR}/ds/:$LD_LIBRARY_PATH ${TASKCLUSTER_TMP_DIR}/ds/deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
assert_correct_ldc93s1_prodmodel "${phrase_pbmodel_withlm}"
|
||||
|
@ -6,17 +6,17 @@ source $(dirname "$0")/tc-tests-utils.sh
|
||||
|
||||
aot_model=$1
|
||||
|
||||
download_material "/tmp/ds" "${aot_model}"
|
||||
download_material "${TASKCLUSTER_TMP_DIR}/ds" "${aot_model}"
|
||||
|
||||
phrase_pbmodel_nolm=$(LD_LIBRARY_PATH=/tmp/ds/:$LD_LIBRARY_PATH /tmp/ds/deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt)
|
||||
phrase_pbmodel_nolm=$(LD_LIBRARY_PATH=${TASKCLUSTER_TMP_DIR}/ds/:$LD_LIBRARY_PATH ${TASKCLUSTER_TMP_DIR}/ds/deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt)
|
||||
assert_correct_ldc93s1 "${phrase_pbmodel_nolm}"
|
||||
|
||||
phrase_pbmodel_withlm=$(LD_LIBRARY_PATH=/tmp/ds/:$LD_LIBRARY_PATH /tmp/ds/deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_pbmodel_withlm=$(LD_LIBRARY_PATH=${TASKCLUSTER_TMP_DIR}/ds/:$LD_LIBRARY_PATH ${TASKCLUSTER_TMP_DIR}/ds/deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
assert_correct_ldc93s1 "${phrase_pbmodel_withlm}"
|
||||
|
||||
if [ "${aot_model}" = "--aot" ]; then
|
||||
phrase_somodel_nolm=$(LD_LIBRARY_PATH=/tmp/ds/:$LD_LIBRARY_PATH /tmp/ds/deepspeech "" /tmp/LDC93S1.wav /tmp/alphabet.txt)
|
||||
phrase_somodel_withlm=$(LD_LIBRARY_PATH=/tmp/ds/:$LD_LIBRARY_PATH /tmp/ds/deepspeech "" /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_somodel_nolm=$(LD_LIBRARY_PATH=${TASKCLUSTER_TMP_DIR}/ds/:$LD_LIBRARY_PATH ${TASKCLUSTER_TMP_DIR}/ds/deepspeech "" ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt)
|
||||
phrase_somodel_withlm=$(LD_LIBRARY_PATH=${TASKCLUSTER_TMP_DIR}/ds/:$LD_LIBRARY_PATH ${TASKCLUSTER_TMP_DIR}/ds/deepspeech "" ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
|
||||
assert_correct_ldc93s1_somodel "${phrase_somodel_nolm}" "${phrase_somodel_withlm}"
|
||||
fi;
|
||||
|
@ -22,5 +22,5 @@ npm install ${DEEPSPEECH_NODEJS}/deepspeech-0.1.0.tgz
|
||||
|
||||
export PATH=$HOME/node_modules/.bin/:$PATH
|
||||
|
||||
phrase_pbmodel_withlm=$(deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_pbmodel_withlm=$(deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
assert_correct_ldc93s1_prodmodel "${phrase_pbmodel_withlm}"
|
||||
|
@ -16,23 +16,26 @@ download_data
|
||||
|
||||
node --version
|
||||
npm --version
|
||||
|
||||
NODE_ROOT="${DS_ROOT_TASK}/ds-test/"
|
||||
export NODE_PATH="${NODE_ROOT}/node_modules/"
|
||||
export PATH="${NODE_PATH}/.bin/:$PATH"
|
||||
|
||||
if [ "${aot_model}" = "--aot" ]; then
|
||||
npm install ${DEEPSPEECH_AOT_ARTIFACTS_ROOT}/deepspeech-0.1.0.tgz
|
||||
npm install --prefix ${NODE_ROOT} ${DEEPSPEECH_AOT_ARTIFACTS_ROOT}/deepspeech-0.1.0.tgz
|
||||
else
|
||||
npm install ${DEEPSPEECH_NODEJS}/deepspeech-0.1.0.tgz
|
||||
npm install --prefix ${NODE_ROOT} ${DEEPSPEECH_NODEJS}/deepspeech-0.1.0.tgz
|
||||
fi
|
||||
|
||||
export PATH=$HOME/node_modules/.bin/:$PATH
|
||||
|
||||
phrase_pbmodel_nolm=$(deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt)
|
||||
phrase_pbmodel_nolm=$(deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt)
|
||||
assert_correct_ldc93s1 "${phrase_pbmodel_nolm}"
|
||||
|
||||
phrase_pbmodel_withlm=$(deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_pbmodel_withlm=$(deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
assert_correct_ldc93s1 "${phrase_pbmodel_withlm}"
|
||||
|
||||
if [ "${aot_model}" = "--aot" ]; then
|
||||
phrase_somodel_nolm=$(deepspeech "" /tmp/LDC93S1.wav /tmp/alphabet.txt)
|
||||
phrase_somodel_withlm=$(deepspeech "" /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_somodel_nolm=$(deepspeech "" ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt)
|
||||
phrase_somodel_withlm=$(deepspeech "" ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
|
||||
assert_correct_ldc93s1_somodel "${phrase_somodel_nolm}" "${phrase_somodel_withlm}"
|
||||
fi
|
||||
|
@ -46,7 +46,7 @@ deepspeech_pkg="deepspeech-0.1.0-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}
|
||||
|
||||
pip install --upgrade ${DEEPSPEECH_ARTIFACTS_ROOT}/${deepspeech_pkg}
|
||||
|
||||
phrase_pbmodel_withlm=$(deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_pbmodel_withlm=$(deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
assert_correct_ldc93s1_prodmodel "${phrase_pbmodel_withlm}"
|
||||
|
||||
deactivate
|
||||
|
@ -13,18 +13,18 @@ if [ -z "${pyver}" ]; then
|
||||
fi;
|
||||
|
||||
# 2.7.x => 27
|
||||
pyver_pkg=$(echo "${pyver}" | cut -d'.' --output-delimiter="" -f1,2)
|
||||
pyver_pkg=$(echo "${pyver}" | cut -d'.' -f1,2 | tr -d '.')
|
||||
|
||||
# mu => unicode, 2 bytes python 2.7
|
||||
# m => unicode, 4 bytes python >+ 3
|
||||
py_unicode_type="m"
|
||||
if [ "${pyver_pkg}" = "27" ]; then
|
||||
if [ "${OS}" = "Linux" -a "${pyver_pkg}" = "27" ]; then
|
||||
py_unicode_type="mu"
|
||||
fi;
|
||||
|
||||
unset PYTHON_BIN_PATH
|
||||
unset PYTHONPATH
|
||||
export PYENV_ROOT="${HOME}/ds-test/.pyenv"
|
||||
export PYENV_ROOT="${DS_ROOT_TASK}/ds-test/.pyenv"
|
||||
export PATH="${PYENV_ROOT}/bin:$PATH"
|
||||
|
||||
mkdir -p ${PYENV_ROOT} || true
|
||||
@ -39,7 +39,7 @@ pyenv install ${pyver}
|
||||
pyenv virtualenv ${pyver} ${PYENV_NAME}
|
||||
source ${PYENV_ROOT}/versions/${pyver}/envs/${PYENV_NAME}/bin/activate
|
||||
|
||||
platform=$(python -c 'import sys; import platform; plat = platform.system().lower(); plat = "manylinux1" if plat == "linux" else plat; sys.stdout.write("%s_%s" % (plat, platform.machine()));')
|
||||
platform=$(python -c 'import sys; import platform; plat = platform.system().lower(); plat = "manylinux1" if plat == "linux" else plat; plat = "macosx_10_10" if plat == "darwin" else plat; sys.stdout.write("%s_%s" % (plat, platform.machine()));')
|
||||
deepspeech_pkg="deepspeech-0.1.0-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl"
|
||||
|
||||
if [ "${aot_model}" = "--aot" ]; then
|
||||
@ -49,15 +49,15 @@ else
|
||||
fi
|
||||
pip install --upgrade ${deepspeech_pkg_url}
|
||||
|
||||
phrase_pbmodel_nolm=$(deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt)
|
||||
phrase_pbmodel_nolm=$(deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt)
|
||||
assert_correct_ldc93s1 "${phrase_pbmodel_nolm}"
|
||||
|
||||
phrase_pbmodel_withlm=$(deepspeech /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_pbmodel_withlm=$(deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
assert_correct_ldc93s1 "${phrase_pbmodel_withlm}"
|
||||
|
||||
if [ "${aot_model}" = "--aot" ]; then
|
||||
phrase_somodel_nolm=$(deepspeech "" /tmp/LDC93S1.wav /tmp/alphabet.txt)
|
||||
phrase_somodel_withlm=$(deepspeech "" /tmp/LDC93S1.wav /tmp/alphabet.txt /tmp/lm.binary /tmp/trie)
|
||||
phrase_somodel_nolm=$(deepspeech "" ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt)
|
||||
phrase_somodel_withlm=$(deepspeech "" ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/lm.binary ${TASKCLUSTER_TMP_DIR}/trie)
|
||||
|
||||
assert_correct_ldc93s1_somodel "${phrase_somodel_nolm}" "${phrase_somodel_withlm}"
|
||||
fi
|
||||
|
@ -10,9 +10,19 @@ fi;
|
||||
if [ "${OS}" = "Darwin" ]; then
|
||||
export DS_ROOT_TASK=${TASKCLUSTER_TASK_DIR}
|
||||
export SWIG_LIB="$(find ${DS_ROOT_TASK}/homebrew/Cellar/swig/ -type f -name "swig.swg" | xargs dirname)"
|
||||
|
||||
# It seems chaining |export DYLD_LIBRARY_PATH=...| does not work, maybe
|
||||
# because of SIP? Who knows ...
|
||||
if [ ! -z "${EXTRA_ENV}" ]; then
|
||||
eval "export ${EXTRA_ENV}"
|
||||
fi;
|
||||
fi;
|
||||
|
||||
export TASKCLUSTER_ARTIFACTS=${TASKCLUSTER_ARTIFACTS:-/tmp/artifacts}
|
||||
export TASKCLUSTER_TMP_DIR=${TASKCLUSTER_TMP_DIR:-/tmp}
|
||||
|
||||
mkdir -p ${TASKCLUSTER_TMP_DIR} || true
|
||||
|
||||
export DS_TFDIR=${DS_ROOT_TASK}/DeepSpeech/tf
|
||||
export DS_DSDIR=${DS_ROOT_TASK}/DeepSpeech/ds
|
||||
|
||||
@ -145,11 +155,11 @@ download_ctc_kenlm()
|
||||
|
||||
download_data()
|
||||
{
|
||||
wget ${model_source} -O /tmp/${model_name}
|
||||
wget https://catalog.ldc.upenn.edu/desc/addenda/LDC93S1.wav -O /tmp/LDC93S1.wav
|
||||
cp ~/DeepSpeech/ds/data/alphabet.txt /tmp/alphabet.txt
|
||||
cp ~/DeepSpeech/ds/data/lm/lm.binary /tmp/lm.binary
|
||||
cp ~/DeepSpeech/ds/data/lm/trie /tmp/trie
|
||||
wget ${model_source} -O ${TASKCLUSTER_TMP_DIR}/${model_name}
|
||||
wget https://catalog.ldc.upenn.edu/desc/addenda/LDC93S1.wav -O ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav
|
||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/alphabet.txt ${TASKCLUSTER_TMP_DIR}/alphabet.txt
|
||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/lm/lm.binary ${TASKCLUSTER_TMP_DIR}/lm.binary
|
||||
cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/lm/trie ${TASKCLUSTER_TMP_DIR}/trie
|
||||
}
|
||||
|
||||
download_material()
|
||||
@ -165,7 +175,7 @@ download_material()
|
||||
|
||||
download_data
|
||||
|
||||
ls -hal /tmp/${model_name} /tmp/LDC93S1.wav /tmp/alphabet.txt
|
||||
ls -hal ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt
|
||||
}
|
||||
|
||||
install_pyenv()
|
||||
|
Loading…
x
Reference in New Issue
Block a user