Split Debian control files by architecture
This commit is contained in:
parent
5f5785c57f
commit
520acf9383
13 changed files with 111 additions and 26 deletions
30
Dockerfile
30
Dockerfile
|
|
@ -31,12 +31,16 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||
|
||||
RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
|
||||
|
||||
COPY debian/control.in.* ./debian/
|
||||
|
||||
# Use dependencies from Debian package control file
|
||||
RUN --mount=type=cache,id=apt-build,target=/var/cache/apt \
|
||||
mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
|
||||
apt-get update && \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
python3 python3-pip python3-venv \
|
||||
build-essential python3-dev
|
||||
mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
|
||||
apt-get update && \
|
||||
grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
|
||||
xargs apt-get install --yes --no-install-recommends \
|
||||
python3 python3-pip python3-venv \
|
||||
build-essential python3-dev
|
||||
|
||||
|
||||
WORKDIR /home/mimic3/app
|
||||
|
|
@ -67,24 +71,28 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||
|
||||
RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
|
||||
|
||||
WORKDIR /home/mimic3/app
|
||||
|
||||
COPY debian/control.in.* ./debian/
|
||||
|
||||
# Use dependencies from Debian package control file
|
||||
RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
|
||||
mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
|
||||
apt-get update && \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
python3 ca-certificates libespeak-ng1 libatomic1 libgomp1
|
||||
grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
|
||||
xargs apt-get install --yes --no-install-recommends \
|
||||
python3 ca-certificates
|
||||
|
||||
RUN useradd -ms /bin/bash mimic3
|
||||
|
||||
# Copy virtual environment and source code
|
||||
COPY --from=build /home/mimic3/app/ /home/mimic3/app/
|
||||
COPY --from=build /home/mimic3/app/ ./
|
||||
|
||||
# Copy pre-downloaded voice(s)
|
||||
COPY --from=build /root/.local/share/mimic3/voices/ /usr/share/mimic3/voices/
|
||||
|
||||
WORKDIR /home/mimic3/app
|
||||
|
||||
# Run test
|
||||
COPY tests/apope_sample.txt tests/apope_sample_*.wav tests/
|
||||
COPY tests/apope_sample.txt tests/apope_sample_*.wav ./tests/
|
||||
|
||||
# Generate sample and check
|
||||
RUN export expected_sample="tests/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav" && \
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ RUN --mount=type=cache,id=pip-venv,target=/root/.cache/pip \
|
|||
|
||||
# Install PyInstaller
|
||||
RUN --mount=type=cache,id=pip-venv,target=/root/.cache/pip \
|
||||
.venv/bin/pip3 install 'pyinstaller>=4,<5'
|
||||
.venv/bin/pip3 install -f wheels 'pyinstaller>=4,<5'
|
||||
|
||||
COPY pyinstaller/mimic3.py ./pyinstaller/
|
||||
|
||||
|
|
@ -120,9 +120,8 @@ COPY voices/ voices/
|
|||
|
||||
RUN mkdir -p "${package_dir}/DEBIAN" && \
|
||||
export VERSION="$(cat mimic3-tts/mimic3_tts/VERSION)" && \
|
||||
export DEBIAN_ARCH="$(dpkg-architecture | grep '^DEB_HOST_ARCH=' | sed -e 's/^.\+=//')" && \
|
||||
envsubst \
|
||||
< "debian/control.in" \
|
||||
< "debian/control.in.${TARGETARCH}${TARGETVARIANT}" \
|
||||
> "${package_dir}/DEBIAN/control" && \
|
||||
mkdir -p "${package_dir}/usr/lib/mimic3-tts" && \
|
||||
rsync -av "dist/mimic3/" "${package_dir}/usr/lib/mimic3-tts/" && \
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
!wheels/
|
||||
|
||||
# Debian packaging
|
||||
!debian/control.in
|
||||
!debian/control.in.*
|
||||
!debian/bin/*
|
||||
|
||||
# opentts-abc
|
||||
|
|
|
|||
|
|
@ -58,12 +58,15 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||
|
||||
RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
|
||||
|
||||
COPY debian/control.in.* ./debian/
|
||||
|
||||
# Use dependencies from Debian package control file
|
||||
RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
|
||||
mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
|
||||
apt-get update && \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
python3 python3-venv python3-pip \
|
||||
libespeak-ng1 libatomic1 libgomp1
|
||||
grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
|
||||
xargs apt-get install --yes --no-install-recommends \
|
||||
python3 python3-venv python3-pip
|
||||
|
||||
WORKDIR /test
|
||||
|
||||
|
|
@ -75,8 +78,8 @@ COPY --from=build /build/mimic3/dist/*.tar.gz ./dist/
|
|||
RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
|
||||
python3 -m venv .venv && \
|
||||
.venv/bin/pip3 install \
|
||||
-f wheels/ \
|
||||
-f https://synesthesiam.github.io/prebuilt-apps/ \
|
||||
-f https://www.piwheels.hostedpi.com/simple/numpy/ \
|
||||
-f dist/ \
|
||||
mimic3-tts
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
!tests/apope_sample_*.wav
|
||||
!voices/
|
||||
!wheels/
|
||||
!debian/control.in.*
|
||||
|
||||
# opentts-abc
|
||||
!opentts-abc/setup.py
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
!tests/apope_sample_*.wav
|
||||
!voices/
|
||||
!wheels/
|
||||
!debian/control.in.*
|
||||
|
||||
# opentts-abc
|
||||
!opentts-abc/setup.py
|
||||
|
|
|
|||
|
|
@ -30,11 +30,15 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||
|
||||
RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
|
||||
|
||||
COPY debian/control.in.* ./debian/
|
||||
|
||||
# Use dependencies from Debian package control file
|
||||
RUN --mount=type=cache,id=apt-build,target=/var/cache/apt \
|
||||
mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
|
||||
apt-get update && \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
python3 python3-pip python3-venv
|
||||
mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
|
||||
apt-get update && \
|
||||
grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
|
||||
xargs apt-get install --yes --no-install-recommends \
|
||||
python3 python3-pip python3-venv
|
||||
|
||||
WORKDIR /home/mimic3/app
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
!tests/apope_sample.txt
|
||||
!voices/
|
||||
!wheels/
|
||||
!debian/control.in.*
|
||||
|
||||
# opentts-abc
|
||||
!opentts-abc/setup.py
|
||||
|
|
|
|||
4
debian/control.in → debian/control.in.amd64
vendored
4
debian/control.in → debian/control.in.amd64
vendored
|
|
@ -2,8 +2,8 @@ Package: mimic3-tts
|
|||
Version: ${VERSION}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: libespeak-ng1,libatomic1,libgomp1
|
||||
Depends: libespeak-ng1
|
||||
Recommends: sox
|
||||
Architecture: ${DEBIAN_ARCH}
|
||||
Architecture: amd64
|
||||
Maintainer: Mycroft AI
|
||||
Description: A fast, local, neural text to speech system for Mycroft
|
||||
9
debian/control.in.arm64
vendored
Normal file
9
debian/control.in.arm64
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Package: mimic3-tts
|
||||
Version: ${VERSION}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: libespeak-ng1
|
||||
Recommends: sox
|
||||
Architecture: arm64
|
||||
Maintainer: Mycroft AI
|
||||
Description: A fast, local, neural text to speech system for Mycroft
|
||||
9
debian/control.in.armv7
vendored
Normal file
9
debian/control.in.armv7
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Package: mimic3-tts
|
||||
Version: ${VERSION}
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: libespeak-ng1,libatomic1,libgomp1,libatlas-base-dev
|
||||
Recommends: sox
|
||||
Architecture: armhf
|
||||
Maintainer: Mycroft AI
|
||||
Description: A fast, local, neural text to speech system for Mycroft
|
||||
|
|
@ -35,7 +35,7 @@ this_dir="$( cd "$( dirname "$0" )" && pwd )"
|
|||
|
||||
# pip install command
|
||||
if [ -z "${PIP_INSTALL}" ]; then
|
||||
PIP_INSTALL="install -f "${this_dir}/wheels""
|
||||
PIP_INSTALL="install -f "${this_dir}/wheels" -f https://synesthesiam.github.io/prebuilt-apps/"
|
||||
fi
|
||||
|
||||
python_version="$(${PYTHON} --version)"
|
||||
|
|
|
|||
|
|
@ -321,6 +321,56 @@
|
|||
],
|
||||
"properties": {}
|
||||
},
|
||||
"en_US/hifi-tts_low": {
|
||||
"files": {
|
||||
"ALIASES": {
|
||||
"size_bytes": 15,
|
||||
"sha256_sum": "193592c118c555b769e3b7eeca7ba4325accc7576473cc403b4ff42987643a0e"
|
||||
},
|
||||
"LICENSE": {
|
||||
"size_bytes": 199,
|
||||
"sha256_sum": "27a903cab1081b055dba1bcef7b543572318eb2f255ec8999103f368f845df24"
|
||||
},
|
||||
"README.md": {
|
||||
"size_bytes": 173,
|
||||
"sha256_sum": "1240c01f4690ae5c9a758562cf61bcc63e83f38c9a553b6f12b7ac450df35d00"
|
||||
},
|
||||
"SOURCE": {
|
||||
"size_bytes": 28,
|
||||
"sha256_sum": "dcfc704446de47e8438a04cb4029c0aaa86a4931d10685080b307cec98345862"
|
||||
},
|
||||
"config.json": {
|
||||
"size_bytes": 3660,
|
||||
"sha256_sum": "eb5ba8f05a968c8281334912f779566e19d5873f1c999631c65f8a53222744d6"
|
||||
},
|
||||
"generator.onnx": {
|
||||
"size_bytes": 76329055,
|
||||
"sha256_sum": "45983e12395beadf7527cf5a043b52c93368f753d21c411ee103a7496c9190cb"
|
||||
},
|
||||
"phoneme_map.txt": {
|
||||
"size_bytes": 15,
|
||||
"sha256_sum": "4003f421fc91ed1d5a343442659db6cf9d58bd1c6d8d771abc1999cc24d7694d"
|
||||
},
|
||||
"phonemes.txt": {
|
||||
"size_bytes": 263,
|
||||
"sha256_sum": "8f9c3e6ced14d7fc5426e4e1bc7f7cc1037a20a645ca34110abcb76148fa8bfd"
|
||||
},
|
||||
"speaker_map.csv": {
|
||||
"size_bytes": 49,
|
||||
"sha256_sum": "265bdaecffe484f41962e78c8cf7f7ef78a43d2de7c10277ca996f874d3146cd"
|
||||
},
|
||||
"speakers.txt": {
|
||||
"size_bytes": 13,
|
||||
"sha256_sum": "7dce6a2c4af708b94215d1a4226d5c0d0f48ceded8a3bdd21fb1ef85c216227c"
|
||||
}
|
||||
},
|
||||
"speakers": [
|
||||
"9017",
|
||||
"6097",
|
||||
"92"
|
||||
],
|
||||
"properties": {}
|
||||
},
|
||||
"en_US/ljspeech_low": {
|
||||
"files": {
|
||||
"ALIASES": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue