-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'open-mmlab:main' into eval_refactor
- Loading branch information
Showing
74 changed files
with
3,933 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright (c) 2023 Amphion. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
# Other version: https://hub.docker.com/r/nvidia/cuda/tags | ||
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu18.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG PYTORCH='2.0.0' | ||
ARG CUDA='cu118' | ||
ARG SHELL='/bin/bash' | ||
ARG MINICONDA='Miniconda3-py39_23.3.1-0-Linux-x86_64.sh' | ||
|
||
ENV LANG=en_US.UTF-8 PYTHONIOENCODING=utf-8 PYTHONDONTWRITEBYTECODE=1 CUDA_HOME=/usr/local/cuda CONDA_HOME=/opt/conda SHELL=${SHELL} | ||
ENV PATH=$CONDA_HOME/bin:$CUDA_HOME/bin:$PATH \ | ||
LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH \ | ||
LIBRARY_PATH=$CUDA_HOME/lib64:$LIBRARY_PATH \ | ||
CONDA_PREFIX=$CONDA_HOME \ | ||
NCCL_HOME=$CUDA_HOME | ||
|
||
# Install ubuntu packages | ||
RUN sed -i 's/archive.ubuntu.com/mirrors.cloud.tencent.com/g' /etc/apt/sources.list \ | ||
&& sed -i 's/security.ubuntu.com/mirrors.cloud.tencent.com/g' /etc/apt/sources.list \ | ||
&& rm /etc/apt/sources.list.d/cuda.list \ | ||
&& apt-get update \ | ||
&& apt-get -y install \ | ||
python3-pip ffmpeg git less wget libsm6 libxext6 libxrender-dev \ | ||
build-essential cmake pkg-config libx11-dev libatlas-base-dev \ | ||
libgtk-3-dev libboost-python-dev vim libgl1-mesa-glx \ | ||
libaio-dev software-properties-common tmux \ | ||
espeak-ng | ||
|
||
# Install miniconda with python 3.9 | ||
USER root | ||
# COPY Miniconda3-py39_23.3.1-0-Linux-x86_64.sh /root/anaconda.sh | ||
RUN wget -t 0 -c -O /tmp/anaconda.sh https://repo.anaconda.com/miniconda/${MINICONDA} \ | ||
&& mv /tmp/anaconda.sh /root/anaconda.sh \ | ||
&& ${SHELL} /root/anaconda.sh -b -p $CONDA_HOME \ | ||
&& rm /root/anaconda.sh | ||
|
||
RUN conda create -y --name amphion python=3.9.15 | ||
|
||
WORKDIR /app | ||
COPY env.sh env.sh | ||
RUN chmod +x ./env.sh | ||
|
||
RUN ["conda", "run", "-n", "amphion", "-vvv", "--no-capture-output", "./env.sh"] | ||
|
||
RUN conda init \ | ||
&& echo "\nconda activate amphion\n" >> ~/.bashrc | ||
|
||
CMD ["/bin/bash"] | ||
|
||
# *** Build *** | ||
# docker build -t realamphion/amphion . | ||
|
||
# *** Run *** | ||
# cd Amphion | ||
# docker run --runtime=nvidia --gpus all -it -v .:/app -v /mnt:/mnt_host realamphion/amphion | ||
|
||
# *** Push and release *** | ||
# docker login | ||
# docker push realamphion/amphion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Mount dataset in Docker container | ||
|
||
When using Docker to run Amphion, mount the dataset to the container first is needed. It is recommend to mounte dataset to `/mnt/<dataset_name>` in the container, where `<dataset_name>` is the name of the dataset. | ||
|
||
When configuring the dataset in `exp_config.json`, you should use the path `/mnt/<dataset_name>` as the dataset path instead of the actual path on your host machine. Otherwise, the dataset will not be found in the container. | ||
|
||
## Mount Example | ||
|
||
```bash | ||
docker run --runtime=nvidia --gpus all -it -v .:/app -v <dataset_path1>:/mnt/<dataset_name1> -v <dataset_path2>:/mnt/<dataset_name2> amphion | ||
``` | ||
|
||
For example, if you want to use the `LJSpeech` dataset, you can mount the dataset to `/mnt/LJSpeech` in the container. | ||
|
||
```bash | ||
docker run --runtime=nvidia --gpus all -it -v .:/app -v /home/username/datasets/LJSpeech:/mnt/LJSpeech amphion | ||
``` | ||
|
||
If you want to use multiple datasets, you can mount them to different directories in the container by adding more `-v` options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.