-
Notifications
You must be signed in to change notification settings - Fork 2
/
run.sh
executable file
·70 lines (58 loc) · 1.38 KB
/
run.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env bash
set -eu -o pipefail
if [ -z ${BUILD_OPENBLAS:-} ]; then
build_openblas=false
else
build_openblas=true
fi
target=$1
git_hash=$2
(
set -eu -o pipefail
mkdir kaldi
cd kaldi
git init
git remote add origin https://github.com/kaldi-asr/kaldi
git fetch origin ${git_hash}
git reset --hard FETCH_HEAD
(
set -eu -o pipefail
cd tools
echo "=== build sctk ==="
bash ../../install_sctk.sh
echo "=== build sph2pie ==="
bash ../../install_sph2pipe.sh
bash ../../download_openfst.sh
)
(
set -eu -o pipefail
cd tools
./extras/check_dependencies.sh
#
if "${build_openblas}"; then
echo "=== install openblas ==="
extras/install_openblas.sh
else
echo "=== install mkl ==="
sudo ./extras/install_mkl.sh
fi
echo "=== build portaudio ==="
if [ "${target}" = onlinebin ]; then
extras/install_portaudio.sh
fi
make -j4
)
(
set -eu -o pipefail
echo "=== build kaldi ==="
cd src
if "${build_openblas}"; then
./configure --static --use-cuda=no --mathlib=OPENBLAS
else
./configure --static --use-cuda=no
fi
make -j4 depend
cd $target
make -j4
)
)