Skip to content

Commit 0256bcb

Browse files
committed
env(conda): use transformers for vall-e-x
1 parent 4b520c3 commit 0256bcb

File tree

7 files changed

+67
-34
lines changed

7 files changed

+67
-34
lines changed

.github/workflows/test-extra.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -222,29 +222,29 @@ jobs:
222222
# export PATH=$PATH:/opt/conda/bin
223223
# make -C backend/python/vllm
224224
# make -C backend/python/vllm test
225-
# tests-vallex:
226-
# runs-on: ubuntu-latest
227-
# steps:
228-
# - name: Clone
229-
# uses: actions/checkout@v4
230-
# with:
231-
# submodules: true
232-
# - name: Dependencies
233-
# run: |
234-
# sudo apt-get update
235-
# sudo apt-get install build-essential ffmpeg
236-
# curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \
237-
# sudo install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \
238-
# gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \
239-
# sudo /bin/bash -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list' && \
240-
# sudo /bin/bash -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" | tee -a /etc/apt/sources.list.d/conda.list' && \
241-
# sudo apt-get update && \
242-
# sudo apt-get install -y conda
243-
# sudo apt-get install -y ca-certificates cmake curl patch
244-
# sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2
245-
# sudo rm -rfv /usr/bin/conda || true
246-
# - name: Test vall-e-x
247-
# run: |
248-
# export PATH=$PATH:/opt/conda/bin
249-
# make -C backend/python/vall-e-x
250-
# make -C backend/python/vall-e-x test
225+
tests-vallex:
226+
runs-on: ubuntu-latest
227+
steps:
228+
- name: Clone
229+
uses: actions/checkout@v4
230+
with:
231+
submodules: true
232+
- name: Dependencies
233+
run: |
234+
sudo apt-get update
235+
sudo apt-get install build-essential ffmpeg
236+
curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \
237+
sudo install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \
238+
gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \
239+
sudo /bin/bash -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list' && \
240+
sudo /bin/bash -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" | tee -a /etc/apt/sources.list.d/conda.list' && \
241+
sudo apt-get update && \
242+
sudo apt-get install -y conda
243+
sudo apt-get install -y ca-certificates cmake curl patch
244+
sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2
245+
sudo rm -rfv /usr/bin/conda || true
246+
- name: Test vall-e-x
247+
run: |
248+
export PATH=$PATH:/opt/conda/bin
249+
make -C backend/python/vall-e-x
250+
make -C backend/python/vall-e-x test

backend/python/common-env/transformers/transformers-nvidia.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,21 @@ dependencies:
9696
- urllib3==1.26.17
9797
- xxhash==3.4.1
9898
- yarl==1.9.2
99+
- soundfile
100+
- langid
101+
- wget
102+
- unidecode
103+
- pyopenjtalk-prebuilt
104+
- pypinyin
105+
- inflect
106+
- cn2an
107+
- jieba
108+
- eng_to_ipa
109+
- openai-whisper
110+
- matplotlib
111+
- gradio==3.41.2
112+
- nltk
113+
- sudachipy
114+
- sudachidict_core
115+
- vocos
99116
prefix: /opt/conda/envs/transformers

backend/python/common-env/transformers/transformers.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,21 @@ dependencies:
8484
- urllib3==1.26.17
8585
- xxhash==3.4.1
8686
- yarl==1.9.2
87-
prefix: /opt/conda/envs/transformers
87+
- soundfile
88+
- langid
89+
- wget
90+
- unidecode
91+
- pyopenjtalk-prebuilt
92+
- pypinyin
93+
- inflect
94+
- cn2an
95+
- jieba
96+
- eng_to_ipa
97+
- openai-whisper
98+
- matplotlib
99+
- gradio==3.41.2
100+
- nltk
101+
- sudachipy
102+
- sudachidict_core
103+
- vocos
104+
prefix: /opt/conda/envs/transformers

backend/python/vall-e-x/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
.PHONY: ttsvalle
22
ttsvalle:
3-
@echo "Creating virtual environment..."
4-
@conda env create --name ttsvalle --file ttsvalle.yml
5-
@echo "Virtual environment created."
3+
$(MAKE) -C ../common-env/transformers
64
bash install.sh
75

86
.PHONY: run

backend/python/vall-e-x/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
##
44
## A bash script installs the required dependencies of VALL-E-X and prepares the environment
55
export PATH=$PATH:/opt/conda/bin
6+
export SHA=3faaf8ccadb154d63b38070caf518ce9309ea0f4
67

78
# Activate conda environment
8-
source activate ttsvalle
9+
source activate transformers
910

1011
echo $CONDA_PREFIX
1112

12-
git clone https://github.com/Plachtaa/VALL-E-X.git $CONDA_PREFIX/vall-e-x && pushd $CONDA_PREFIX/vall-e-x && pip install -r requirements.txt && popd
13+
git clone https://github.com/Plachtaa/VALL-E-X.git $CONDA_PREFIX/vall-e-x && pushd $CONDA_PREFIX/vall-e-x && git checkout -b build $SHA && pip install -r requirements.txt && popd
1314

1415
cp -rfv $CONDA_PREFIX/vall-e-x/* ./

backend/python/vall-e-x/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
export PATH=$PATH:/opt/conda/bin
66

77
# Activate conda environment
8-
source activate ttsvalle
8+
source activate transformers
99

1010
# get the directory where the bash script is located
1111
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

backend/python/vall-e-x/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## A bash script wrapper that runs the ttsvalle server with conda
44

55
# Activate conda environment
6-
source activate ttsvalle
6+
source activate transformers
77

88
# get the directory where the bash script is located
99
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

0 commit comments

Comments
 (0)