Skip to content

Commit 4bd3a9e

Browse files
committed
fix Docker file
1 parent 718b873 commit 4bd3a9e

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ six~=1.17.0
44
numpy==1.23.5
55
audioread==3.0.0
66
librosa==0.9.2
7-
SoundFile==0.11.0; sys_platform != 'darwin'
7+
SoundFile>=0.11.0; sys_platform != 'darwin'
88
PySoundFile==0.9.0.post1; sys_platform == 'darwin'
99
scipy==1.9.3
1010
pyrubberband==0.3.0
@@ -40,7 +40,6 @@ Faster_Whisper
4040
funasr==1.0.27
4141
torchaudio
4242
python-mecab-ko
43-
opencc~=1.1.9
4443
matplotlib~=3.9.4
4544

4645
PyYAML~=6.0.2
@@ -65,3 +64,4 @@ logger
6564
datasets>=2.15.0
6665
simplejson
6766
sortedcontainers
67+
httpx

scripts/Dockerfile

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@ RUN apt-get update --yes && \
1313
rm -rf /var/lib/apt/lists/*
1414

1515
# Install pnpm
16-
RUN curl -fsSL https://get.pnpm.io/install.sh | sh -
16+
RUN export SHELL=/bin/bash && curl -fsSL https://get.pnpm.io/install.sh | sh -
1717

1818
# Install statics
1919
WORKDIR /root
2020
RUN git clone https://github.com/megaease/easevoice-trainer-portal.git
2121
RUN cd easevoice-trainer-portal && echo 'use-node-version=22.14.0' >> ~/.npmrc
22-
RUN cd easevoice-trainer-portal && pnpm install && pnpm build
22+
RUN cd easevoice-trainer-portal && /root/.local/share/pnpm/pnpm install && /root/.local/share/pnpm/pnpm build
2323

2424
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 AS runtime
2525

26+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
27+
ENV DEBIAN_FRONTEND noninteractive SHELL=/bin/bash
28+
2629
# Install some basic utilities
2730
RUN apt-get update --yes && \
2831
apt-get upgrade --yes && \
@@ -75,10 +78,31 @@ RUN pip install torch==2.4.0+cu124 torchvision==0.19.0+cu124 \
7578
WORKDIR /megaease
7679
RUN git clone https://github.com/megaease/easevoice-trainer.git
7780
COPY --from=builder /root/easevoice-trainer-portal/dist /megaease/easevoice-trainer/src/dist
78-
RUN pip install -r /megaease/easevoice-trainer/requirements.txt && \
79-
pip install uv && \ rm -rf ~/.cache/pip
81+
RUN pip install -r /megaease/easevoice-trainer/requirements.txt
82+
83+
RUN apt-get install git-lfs -y && git lfs install
84+
RUN mkdir -p /megaease/easevoice-trainer/models
85+
RUN cd /megaease/easevoice-trainer/models && \
86+
git clone https://huggingface.co/lj1995/GPT-SoVITS && \
87+
git clone https://huggingface.co/Delik/uvr5_weights && \
88+
git clone https://www.modelscope.cn/iic/speech_frcrn_ans_cirm_16k.git && \
89+
git clone https://huggingface.co/lucasjin/punc_ct-transformer_zh-cn-common-vocab272727-pytorch && \
90+
git clone https://huggingface.co/manyeyes/speech_fsmn_vad_zh-cn-16k-common-onnx && \
91+
git clone https://www.modelscope.cn/iic/speech_fsmn_vad_zh-cn-16k-common-pytorch.git && \
92+
git clone https://www.modelscope.cn/iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git && \
93+
mv GPT-SoVITS /megaease/easevoice-trainer/models/pretrained && \
94+
mv uvr5_weights /megaease/easevoice-trainer/models/uvr5_weights && \
95+
mkdir -p /megaease/easevoice-trainer/models/asr&& \
96+
mv speech_fsmn_vad_zh-cn-16k-common-onnx /megaease/easevoice-trainer/models/asr/speech_fsmn_vad_zh-cn-16k-common-onnx && \
97+
mv speech_fsmn_vad_zh-cn-16k-common-pytorch /megaease/easevoice-trainer/models/asr/speech_fsmn_vad_zh-cn-16k-common-pytorch && \
98+
mv punc_ct-transformer_zh-cn-common-vocab272727-pytorch /megaease/easevoice-trainer/models/asr/punc_ct-transformer_zh-cn-common-vocab272727-pytorch && \
99+
mv speech_frcrn_ans_cirm_16k /megaease/easevoice-trainer/models/asr/speech_frcrn_ans_cirm_16k && \
100+
mv speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch /megaease/easevoice-trainer/models/asr/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
101+
80102

81103
COPY start.sh /usr/local/bin/start.sh
82104
RUN chmod +x /usr/local/bin/start.sh
83105

106+
EXPOSE 8000
107+
84108
CMD ["/usr/local/bin/start.sh"]

scripts/start.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
echo "Starting trainer..."
44

5-
uv run src/main.py &
5+
6+
cd /megaease/easevoice-trainer
7+
python src/main.py &
68

79
echo "Starting Jupyter Lab..."
810

11+
cd /
912
jupyter lab --allow-root --no-browser --port=8888 --ip=0.0.0.0 --ServerApp.terminado_settings='{"shell_command":["/bin/bash"]}' --ServerApp.token="$JUPYTER_TOKEN" --ServerApp.allow_origin=* --ServerApp.preferred_dir="/root" --app-dir="/usr/local/share/jupyter/lab"
1013
echo "Jupyter Lab Started"
14+
15+
sleep infinity

0 commit comments

Comments
 (0)