From bc2bbd4820fd706a6af15f83278a836fc0828df4 Mon Sep 17 00:00:00 2001 From: MG8853 Date: Sun, 14 Apr 2024 21:32:54 +0900 Subject: [PATCH] =?UTF-8?q?voicevox=E7=94=A8=E3=83=86=E3=82=B9=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/VOICEVOX_engine.yml | 2 +- VOICEVOX_engine/Dockerfile | 63 +++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/.github/workflows/VOICEVOX_engine.yml b/.github/workflows/VOICEVOX_engine.yml index cf49785..9feb203 100644 --- a/.github/workflows/VOICEVOX_engine.yml +++ b/.github/workflows/VOICEVOX_engine.yml @@ -29,7 +29,7 @@ jobs: with: context: ./VOICEVOX_engine file: ./VOICEVOX_engine/Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: | ghcr.io/mg8853/yolks:voicevox_engine diff --git a/VOICEVOX_engine/Dockerfile b/VOICEVOX_engine/Dockerfile index 9d8cefa..8a819bd 100644 --- a/VOICEVOX_engine/Dockerfile +++ b/VOICEVOX_engine/Dockerfile @@ -1,12 +1,55 @@ -FROM python:3.8-bullseye +FROM --platform=$TARGETOS/$TARGETARCH python:3.11-bookworm ENV DEBIAN_FRONTEND=noninteractive -##useradd -d /home/container -m container && + RUN apt-get update -y \ - && apt-get install -y sudo wget git curl unzip git build-essential \ - ca-certificates openssl tar sqlite3 fontconfig tzdata iproute2 jq p7zip-full libsndfile1 - -RUN pip install Cython + && apt-get install -y \ + sudo \ + wget \ + git \ + dnsutils \ + curl \ + unzip \ + git \ + build-essential \ + ca-certificates \ + openssl \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + jq \ + p7zip-full \ + libsndfile1 \ + ffmpeg \ + procps + +RUN apt-get install -y \ + build-essential \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + libreadline-dev \ + libsqlite3-dev \ + curl \ + libncursesw5-dev \ + xz-utils \ + tk-dev \ + libxml2-dev \ + libxmlsec1-dev \ + libffi-dev \ + liblzma-dev \ + git + +RUN apt-get install -y \ + git \ + wget \ + cmake \ + ca-certificates \ + build-essential \ + gosu \ + libsndfile1 #RUN cd / && \ # wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcpu.zip && \ @@ -39,9 +82,11 @@ RUN pip install Cython USER container ENV USER=container HOME=/home/container - WORKDIR /home/container -COPY entrypoint.sh /entrypoint.sh +STOPSIGNAL SIGINT -CMD ["/bin/bash", "/entrypoint.sh"] +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"]