forked from mozilla/DeepSpeech
-
Notifications
You must be signed in to change notification settings - Fork 2
/
tc-train-tests.sh
43 lines (30 loc) · 1003 Bytes
/
tc-train-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -xe
source $(dirname "$0")/tc-tests-utils.sh
pyver=$1
if [ -z "${pyver}" ]; then
echo "No python version given, aborting."
exit 1
fi;
unset PYTHON_BIN_PATH
unset PYTHONPATH
export PYENV_ROOT="${HOME}/ds-train/.pyenv"
export PATH="${PYENV_ROOT}/bin:${HOME}/bin:$PATH"
mkdir -p ${PYENV_ROOT} || true
mkdir -p ${TASKCLUSTER_ARTIFACTS} || true
mkdir -p /tmp/train || true
install_pyenv "${PYENV_ROOT}"
install_pyenv_virtualenv "$(pyenv root)/plugins/pyenv-virtualenv"
PYENV_NAME=deepspeech-train
pyenv install ${pyver}
pyenv virtualenv ${pyver} ${PYENV_NAME}
source ${PYENV_ROOT}/versions/${pyver}/envs/${PYENV_NAME}/bin/activate
pip install --upgrade ${TENSORFLOW_WHEEL}
grep -v "tensorflow" ${HOME}/DeepSpeech/ds/requirements.txt | pip install --upgrade -r /dev/stdin
download_ctc_kenlm "/tmp/ds"
pushd ${HOME}/DeepSpeech/ds/
time ./bin/run-tc-ldc93s1.sh
popd
deactivate
pyenv uninstall --force ${PYENV_NAME}
cp /tmp/train/output_graph.pb ${TASKCLUSTER_ARTIFACTS}