mirror of
https://github.com/pstrueb/piper.git
synced 2026-06-02 09:57:02 +00:00
Use manylinux to build for older GLIBC (2.28)
This commit is contained in:
+11
-11
@@ -1,19 +1,16 @@
|
||||
FROM debian:bullseye as build
|
||||
FROM quay.io/pypa/manylinux_2_28_x86_64 as build-amd64
|
||||
|
||||
FROM quay.io/pypa/manylinux_2_28_aarch64 as build-arm64
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
FROM build-${TARGETARCH}${TARGETVARIANT} as build
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
|
||||
|
||||
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 \
|
||||
build-essential \
|
||||
autoconf automake libtool pkg-config cmake
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Build minimal version of espeak-ng
|
||||
@@ -43,10 +40,13 @@ COPY Makefile ./
|
||||
COPY src/cpp/ ./src/cpp/
|
||||
RUN make no-pcaudio
|
||||
|
||||
# Do a test run
|
||||
RUN /build/build/larynx --help
|
||||
|
||||
# Build .tar.gz to keep symlinks
|
||||
WORKDIR /dist
|
||||
RUN mkdir -p larynx && \
|
||||
cp -d /usr/lib/libespeak-ng.so* ./larynx/ && \
|
||||
cp -d /usr/lib64/libespeak-ng.so* ./larynx/ && \
|
||||
cp -dR /usr/share/espeak-ng-data ./larynx/ && \
|
||||
cp -d /usr/local/include/onnxruntime/lib/libonnxruntime.so.* ./larynx/ && \
|
||||
cp /build/build/larynx ./larynx/ && \
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
FROM debian:buster
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
COPY local/en-us/ljspeech/low/en-us-ljspeech-low.onnx \
|
||||
local/en-us/ljspeech/low/en-us-ljspeech-low.onnx.json ./
|
||||
|
||||
ADD dist/linux_${TARGETARCH}${TARGETVARIANT}/larynx_${TARGETARCH}${TARGETVARIANT}.tar.gz ./
|
||||
|
||||
RUN cd larynx/ && echo 'This is a test.' | ./larynx -m ../en-us-ljspeech-low.onnx -f test.wav
|
||||
RUN if [ ! -f larynx/test.wav ]; then exit 1; fi
|
||||
RUN size="$(wc -c < larynx/test.wav)"; \
|
||||
if [ "${size}" -lt "1000" ]; then echo "File size is ${size} bytes"; exit 1; fi
|
||||
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!dist/
|
||||
!local/en-us/ljspeech/low/
|
||||
@@ -1,4 +1,4 @@
|
||||
.PHONY: release debug clean docker
|
||||
.PHONY: release debug clean test
|
||||
|
||||
release:
|
||||
mkdir -p build
|
||||
@@ -17,3 +17,6 @@ clean:
|
||||
|
||||
docker:
|
||||
docker buildx build . --platform 'linux/amd64,linux/arm64' --output 'type=local,dest=dist'
|
||||
|
||||
test:
|
||||
docker buildx build -f Dockerfile.test . --platform 'linux/amd64,linux/arm64'
|
||||
|
||||
Reference in New Issue
Block a user