Spaces:
Running
on
Zero
Running
on
Zero
wli3221134
commited on
Upload 4 files
Browse files- Dockerfile +64 -0
- env.sh +28 -0
- packages.txt +2 -0
- requirements.txt +33 -0
Dockerfile
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2023 Amphion.
|
2 |
+
#
|
3 |
+
# This source code is licensed under the MIT license found in the
|
4 |
+
# LICENSE file in the root directory of this source tree.
|
5 |
+
|
6 |
+
# Other version: https://hub.docker.com/r/nvidia/cuda/tags
|
7 |
+
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu18.04
|
8 |
+
|
9 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
10 |
+
ARG PYTORCH='2.0.0'
|
11 |
+
ARG CUDA='cu118'
|
12 |
+
ARG SHELL='/bin/bash'
|
13 |
+
ARG MINICONDA='Miniconda3-py39_23.3.1-0-Linux-x86_64.sh'
|
14 |
+
|
15 |
+
ENV LANG=en_US.UTF-8 PYTHONIOENCODING=utf-8 PYTHONDONTWRITEBYTECODE=1 CUDA_HOME=/usr/local/cuda CONDA_HOME=/opt/conda SHELL=${SHELL}
|
16 |
+
ENV PATH=$CONDA_HOME/bin:$CUDA_HOME/bin:$PATH \
|
17 |
+
LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH \
|
18 |
+
LIBRARY_PATH=$CUDA_HOME/lib64:$LIBRARY_PATH \
|
19 |
+
CONDA_PREFIX=$CONDA_HOME \
|
20 |
+
NCCL_HOME=$CUDA_HOME
|
21 |
+
|
22 |
+
# Install ubuntu packages
|
23 |
+
RUN sed -i 's/archive.ubuntu.com/mirrors.cloud.tencent.com/g' /etc/apt/sources.list \
|
24 |
+
&& sed -i 's/security.ubuntu.com/mirrors.cloud.tencent.com/g' /etc/apt/sources.list \
|
25 |
+
&& rm /etc/apt/sources.list.d/cuda.list \
|
26 |
+
&& apt-get update \
|
27 |
+
&& apt-get -y install \
|
28 |
+
python3-pip ffmpeg git less wget libsm6 libxext6 libxrender-dev \
|
29 |
+
build-essential cmake pkg-config libx11-dev libatlas-base-dev \
|
30 |
+
libgtk-3-dev libboost-python-dev vim libgl1-mesa-glx \
|
31 |
+
libaio-dev software-properties-common tmux \
|
32 |
+
espeak-ng
|
33 |
+
|
34 |
+
# Install miniconda with python 3.9
|
35 |
+
USER root
|
36 |
+
# COPY Miniconda3-py39_23.3.1-0-Linux-x86_64.sh /root/anaconda.sh
|
37 |
+
RUN wget -t 0 -c -O /tmp/anaconda.sh https://repo.anaconda.com/miniconda/${MINICONDA} \
|
38 |
+
&& mv /tmp/anaconda.sh /root/anaconda.sh \
|
39 |
+
&& ${SHELL} /root/anaconda.sh -b -p $CONDA_HOME \
|
40 |
+
&& rm /root/anaconda.sh
|
41 |
+
|
42 |
+
RUN conda create -y --name amphion python=3.9.15
|
43 |
+
|
44 |
+
WORKDIR /app
|
45 |
+
COPY env.sh env.sh
|
46 |
+
RUN chmod +x ./env.sh
|
47 |
+
|
48 |
+
RUN ["conda", "run", "-n", "amphion", "-vvv", "--no-capture-output", "./env.sh"]
|
49 |
+
|
50 |
+
RUN conda init \
|
51 |
+
&& echo "\nconda activate amphion\n" >> ~/.bashrc
|
52 |
+
|
53 |
+
CMD ["/bin/bash"]
|
54 |
+
|
55 |
+
# *** Build ***
|
56 |
+
# docker build -t realamphion/amphion .
|
57 |
+
|
58 |
+
# *** Run ***
|
59 |
+
# cd Amphion
|
60 |
+
# docker run --runtime=nvidia --gpus all -it -v .:/app -v /mnt:/mnt_host realamphion/amphion
|
61 |
+
|
62 |
+
# *** Push and release ***
|
63 |
+
# docker login
|
64 |
+
# docker push realamphion/amphion
|
env.sh
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) 2023 Amphion.
|
2 |
+
#
|
3 |
+
# This source code is licensed under the MIT license found in the
|
4 |
+
# LICENSE file in the root directory of this source tree.
|
5 |
+
|
6 |
+
# Raise error if any command fails
|
7 |
+
set -e
|
8 |
+
|
9 |
+
# Install ffmpeg in Linux
|
10 |
+
conda install -c conda-forge ffmpeg
|
11 |
+
|
12 |
+
# Pip packages
|
13 |
+
pip install setuptools ruamel.yaml tqdm colorama easydict tabulate loguru json5 Cython unidecode inflect argparse g2p_en tgt librosa==0.9.1 matplotlib typeguard einops omegaconf hydra-core humanfriendly pandas munch
|
14 |
+
|
15 |
+
pip install tensorboard tensorboardX torch==2.0.1 torchaudio==2.0.2 torchvision==0.15.2 accelerate==0.24.1 transformers==4.41.2 diffusers praat-parselmouth audiomentations pedalboard ffmpeg-python==0.2.0 pyworld diffsptk==1.0.1 nnAudio unidecode inflect ptwt
|
16 |
+
|
17 |
+
pip install torchmetrics pymcd openai-whisper frechet_audio_distance asteroid resemblyzer vector-quantize-pytorch==1.12.5
|
18 |
+
|
19 |
+
pip install https://github.com/vBaiCai/python-pesq/archive/master.zip
|
20 |
+
|
21 |
+
pip install fairseq
|
22 |
+
|
23 |
+
pip install git+https://github.com/lhotse-speech/lhotse
|
24 |
+
|
25 |
+
pip install black==24.1.1
|
26 |
+
|
27 |
+
# Uninstall nvidia-cublas-cu11 if there exist some bugs about CUDA version
|
28 |
+
# pip uninstall nvidia-cublas-cu11
|
packages.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
ffmpeg
|
2 |
+
espeak-ng
|
requirements.txt
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
json5
|
2 |
+
numpy==1.26.0
|
3 |
+
setuptools
|
4 |
+
ruamel.yaml
|
5 |
+
tqdm
|
6 |
+
tensorboard
|
7 |
+
tensorboardX
|
8 |
+
torch==2.0.1
|
9 |
+
transformers===4.41.1
|
10 |
+
encodec
|
11 |
+
black==24.1.1
|
12 |
+
phonemizer
|
13 |
+
g2p_en
|
14 |
+
accelerate==0.24.1
|
15 |
+
safetensors==0.4.3
|
16 |
+
funasr
|
17 |
+
zhconv
|
18 |
+
zhon
|
19 |
+
modelscope
|
20 |
+
timm
|
21 |
+
jieba
|
22 |
+
cn2an
|
23 |
+
unidecode
|
24 |
+
pypinyin
|
25 |
+
jiwer
|
26 |
+
omegaconf
|
27 |
+
pyworld
|
28 |
+
py3langid==0.2.2
|
29 |
+
LangSegment
|
30 |
+
onnxruntime
|
31 |
+
pyopenjtalk
|
32 |
+
pykakasi
|
33 |
+
openai-whisper
|