-
Notifications
You must be signed in to change notification settings - Fork 520
/
Copy pathbuild.sh
executable file
·40 lines (29 loc) · 1.16 KB
/
build.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
#!/usr/bin/env bash
# wyoming-piper
set -ex
apt-get update
apt-get install -y --no-install-recommends \
netcat-traditional
apt-get clean
rm -rf /var/lib/apt/lists/*
pip3 install --no-cache-dir -U \
setuptools \
wheel
# Do a piper-tts test run
/opt/piper/build/piper --help
# Clone wyoming-piper layer
git clone --branch=${WYOMING_PIPER_BRANCH} https://github.com/rhasspy/wyoming-piper /tmp/wyoming-piper
# Enable CUDA
git -C /tmp/wyoming-piper apply /tmp/wyoming/piper/wyoming-piper_cuda_path.diff
git -C /tmp/wyoming-piper status
pip3 install --no-cache-dir --verbose -r /tmp/wyoming-piper/requirements.txt
# fix version
echo "$WYOMING_PIPER_VERSION" > /tmp/wyoming-piper/wyoming_piper/VERSION
cat /tmp/wyoming-piper/wyoming_piper/VERSION
pip3 wheel --wheel-dir=/opt/wheels --no-deps --verbose /tmp/wyoming-piper
pip3 install --no-cache-dir --verbose /opt/wheels/wyoming_piper*.whl
rm -rf /tmp/wyoming-piper
pip3 show wyoming_piper
python3 -c 'import wyoming_piper; print(wyoming_piper.__version__);'
twine upload --skip-existing --verbose /opt/wheels/wyoming_piper*.whl || echo "failed to upload wheel to ${TWINE_REPOSITORY_URL}"
rm /opt/wheels/wyoming_piper*.whl