diff --git a/docker/Dockerfile_arm64 b/docker/Dockerfile_arm64 new file mode 100644 index 000000000..26b82e997 --- /dev/null +++ b/docker/Dockerfile_arm64 @@ -0,0 +1,76 @@ +FROM dannadori/voice-changer-internal:20221114_095228 as front +# FROM debian:bullseye-slim as base + +# ARG DEBIAN_FRONTEND=noninteractive + +# RUN apt-get update +# RUN apt-get install -y python3-pip git +# RUN apt-get install -y espeak +# RUN apt-get install -y cmake + +# RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113 + + +# RUN pip install Cython==0.29.32 +# RUN pip install numpy==1.22.4 +# RUN pip install scipy==1.9.0 +# RUN pip install librosa==0.9.2 +# RUN pip install phonemizer==3.2.1 +# RUN pip install Unidecode==1.3.4 +# RUN pip install resampy==0.4.0 + +# RUN pip install tqdm==4.64.0 +# RUN pip install retry==0.9.2 +# RUN pip install psutil==5.9.1 +# RUN pip install python-socketio==5.7.1 +# RUN pip install matplotlib==3.5.3 + +# RUN pip install fastapi==0.85.0 +# RUN pip install python-multipart==0.0.5 +# RUN pip install uvicorn==0.18.3 +# RUN pip install websockets==10.4 +# RUN pip install pyOpenSSL==22.0.0 + +# RUN pip install pyopenjtalk==0.2.0 +# RUN pip install tensorboard==2.10.0 + + +FROM sonoisa/deep-learning-coding:pytorch1.12.0_tensorflow2.9.1 +RUN apt-get update \ + && apt-get install -y python3-pip espeak gosu libsndfile1-dev\ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +### Copy local resource +COPY fine_model/G_180000.pth /MMVC_Trainer/fine_model/G_180000.pth +COPY fine_model/D_180000.pth /MMVC_Trainer/fine_model/D_180000.pth + +### Copy from base +# COPY --from=base --chmod=777 /usr/local/lib/python3.9/dist-packages /usr/local/lib/python3.9/dist-packages + +### Copy from frontend +##### MMVC Trainer +COPY --from=front --chmod=777 /MMVC_Trainer /MMVC_Trainer +RUN chmod 0777 /MMVC_Trainer + +ADD /setup.sh /MMVC_Trainer/ +ADD /exec.sh /MMVC_Trainer/ + +##### Voice changer Internal +COPY --from=front --chmod=777 /voice-changer-internal/frontend/dist /voice-changer-internal/frontend/dist +COPY --from=front --chmod=777 /voice-changer-internal/voice-change-service /voice-changer-internal/voice-change-service +RUN chmod 0777 /voice-changer-internal/voice-change-service + + +## 歴史的な経緯でsetup.shをMMVC_Trainerに置いているのでそこを起動時のWORKDIRにしている。 +WORKDIR /MMVC_Trainer + +# ##### Soft VC +# COPY --from=front /hubert /hubert +# COPY --from=front /acoustic-model /acoustic-model +# COPY --from=front /hifigan /hifigan +# COPY --from=front /models /models + + +ENTRYPOINT ["/bin/bash", "setup.sh"] +CMD [ "-h"] diff --git a/package.json b/package.json index 37ad39751..e5ec82988 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,12 @@ "main": "index.js", "scripts": { "build:docker": "date +%Y%m%d%H%M%S > docker/dummy && DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile docker/ -t voice-changer", + "build:docker_arm64": "date +%Y%m%d%H%M%S > docker/dummy && DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile_arm64 docker/ -t voice-changer-arm64", "copy:frontend":"docker run -v `pwd`/frontend/dist:/frontend/dist --entrypoint /bin/bash -ti voice-changer -c \"cp -r /voice-changer-internal/frontend/dist/* /frontend/dist\"", "copy:backend":"docker run -v `pwd`/demo:/demo --entrypoint /bin/bash -ti voice-changer -c \"cp -r /voice-changer-internal/voice-change-service/* /demo/\"", "create:demo":"run-p copy:frontend copy:backend", "push:docker": "bash script/001_pushDocker.sh", + "push:docker_arm64": "bash script/002_pushDocker_arm64.sh", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/script/002_pushDocker_arm64.sh b/script/002_pushDocker_arm64.sh new file mode 100644 index 000000000..f788c61b7 --- /dev/null +++ b/script/002_pushDocker_arm64.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +data_tag=`date +%Y%m%d_%H%M%S` +docker login + +docker tag voice-changer dannadori/voice-changer-arm64:$data_tag +docker push dannadori/voice-changer-arm64:$data_tag