From 999456989833c80be735a8252b440977589615d5 Mon Sep 17 00:00:00 2001 From: Gorkem Date: Thu, 9 Nov 2023 19:05:30 +0300 Subject: [PATCH] Tts 0.20.2 (#5) * TTS 0.20.2 with XTTS V2 * pre-install japanese packages * install sox backend and support libraries * Update Dockerfile typofix * download unidic * noninteractive install * install unidic module * fix req --- server/Dockerfile | 12 ++- server/Dockerfile.cuda118 | 10 ++- server/Dockerfile.cuda121 | 8 ++ server/main.py | 2 +- server/requirements.frozen.txt | 151 --------------------------------- server/requirements.txt | 8 +- 6 files changed, 34 insertions(+), 157 deletions(-) delete mode 100644 server/requirements.frozen.txt diff --git a/server/Dockerfile b/server/Dockerfile index ea40524..585f991 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,9 +1,17 @@ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install --no-install-recommends -y sox libsox-fmt-all curl wget gcc git git-lfs build-essential libaio-dev libsndfile1 ssh ffmpeg && \ + apt-get clean && apt-get -y autoremove + WORKDIR /app -COPY requirements.frozen.txt . -RUN python -m pip install --no-deps -r requirements.frozen.txt \ +COPY requirements.txt . +RUN python -m pip install --use-deprecated=legacy-resolver -r requirements.txt \ && python -m pip cache purge +RUN python -m unidic download + COPY main.py . ENV NUM_THREADS=2 diff --git a/server/Dockerfile.cuda118 b/server/Dockerfile.cuda118 index d3eb115..cdb7898 100644 --- a/server/Dockerfile.cuda118 +++ b/server/Dockerfile.cuda118 @@ -1,13 +1,21 @@ FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install --no-install-recommends -y sox libsox-fmt-all curl wget gcc git git-lfs build-essential libaio-dev libsndfile1 ssh ffmpeg && \ + apt-get clean && apt-get -y autoremove + WORKDIR /app COPY requirements.txt . RUN python -m pip install --use-deprecated=legacy-resolver -r requirements.txt \ && python -m pip cache purge +RUN python -m unidic download + COPY main.py . #Mark this 1 if you have older card -ENV NVIDIA_DISABLE_REQUIRE=0 +ENV NVIDIA_DISABLE_REQUIRE=1 ENV NUM_THREADS=2 EXPOSE 80 diff --git a/server/Dockerfile.cuda121 b/server/Dockerfile.cuda121 index 7eb04c0..fe5df2e 100644 --- a/server/Dockerfile.cuda121 +++ b/server/Dockerfile.cuda121 @@ -1,9 +1,17 @@ FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-devel +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install --no-install-recommends -y sox libsox-fmt-all curl wget gcc git git-lfs build-essential libaio-dev libsndfile1 ssh ffmpeg && \ + apt-get clean && apt-get -y autoremove + WORKDIR /app COPY requirements.txt . RUN python -m pip install --use-deprecated=legacy-resolver -r requirements.txt \ && python -m pip cache purge +RUN python -m unidic download + COPY main.py . #Mark this 1 if you have older card diff --git a/server/main.py b/server/main.py index 3b48f29..1bbb9ee 100644 --- a/server/main.py +++ b/server/main.py @@ -23,7 +23,7 @@ torch.set_num_threads(int(os.environ.get("NUM_THREADS", "2"))) device = torch.device("cuda") -model_name = "tts_models/multilingual/multi-dataset/xtts_v1.1" +model_name = "tts_models/multilingual/multi-dataset/xtts_v2" print("Downloading XTTS Model:",model_name,flush=True) ModelManager().download_model(model_name) model_path = os.path.join(get_user_data_dir("tts"), model_name.replace("/", "--")) diff --git a/server/requirements.frozen.txt b/server/requirements.frozen.txt deleted file mode 100644 index 652ad4b..0000000 --- a/server/requirements.frozen.txt +++ /dev/null @@ -1,151 +0,0 @@ -absl-py==2.0.0 -accelerate==0.24.0 -aiohttp==3.8.6 -aiosignal==1.3.1 -anyascii==0.3.2 -anyio==4.0.0 -appdirs==1.4.4 -astunparse==1.6.3 -async-timeout==4.0.3 -attrs==23.1.0 -audioread==3.0.1 -Babel==2.13.1 -bangla==0.0.2 -blinker==1.6.3 -bnnumerizer==0.0.2 -bnunicodenormalizer==0.1.6 -brotlipy==0.7.0 -cachetools==5.3.2 -clean-fid==0.1.35 -click==8.1.7 -clip-anytorch==2.5.2 -contourpy==1.1.1 -coqpit==0.0.17 -cycler==0.12.1 -Cython==0.29.30 -dateparser==1.1.8 -deepspeed==0.10.3 -dnspython==2.3.0 -docker-pycreds==0.4.0 -docopt==0.6.2 -einops==0.6.1 -encodec==0.1.1 -exceptiongroup==1.1.1 -expecttest==0.1.4 -fastapi==0.95.2 -Flask==2.3.3 -fonttools==4.43.1 -frozenlist==1.4.0 -fsspec==2023.6.0 -ftfy==6.1.1 -g2pkk==0.1.2 -gitdb==4.0.11 -GitPython==3.1.40 -google-auth==2.23.3 -google-auth-oauthlib==1.1.0 -grpcio==1.59.0 -gruut==2.2.3 -gruut-ipa==0.13.0 -gruut-lang-de==2.0.0 -gruut-lang-en==2.0.0 -gruut-lang-es==2.0.0 -gruut-lang-fr==2.0.2 -h11==0.14.0 -hjson==3.1.0 -httptools==0.6.1 -huggingface-hub==0.18.0 -hypothesis==6.75.2 -imageio==2.31.6 -inflect==5.6.2 -itsdangerous==2.1.2 -jamo==0.4.1 -jieba==0.42.1 -joblib==1.3.2 -jsonlines==1.2.0 -jsonmerge==1.9.2 -jsonpointer==2.1 -jsonschema==4.19.1 -jsonschema-specifications==2023.7.1 -k-diffusion==0.0.16 -kiwisolver==1.4.5 -kornia==0.7.0 -lazy_loader==0.3 -librosa==0.10.0 -llvmlite==0.40.1 -Markdown==3.5 -matplotlib==3.7.3 -mkl-fft==1.3.6 -mkl-service==2.4.0 -mpmath==1.3.0 -msgpack==1.0.7 -multidict==6.0.4 -networkx==2.8.8 -ninja==1.11.1.1 -nltk==3.8.1 -num2words==0.5.13 -numba==0.57.0 -numpy==1.22.0 -oauthlib==3.2.2 -packaging==23.1 -pandas==1.5.3 -pathtools==0.1.2 -Pillow==9.4.0 -platformdirs==3.11.0 -pooch==1.8.0 -protobuf==4.23.4 -py-cpuinfo==9.0.0 -pyasn1==0.5.0 -pyasn1-modules==0.3.0 -pydantic==1.10.13 -pynndescent==0.5.10 -pyparsing==3.1.1 -pypinyin==0.49.0 -pysbd==0.3.4 -python-crfsuite==0.9.9 -python-dateutil==2.8.2 -python-dotenv==1.0.0 -python-etcd==0.4.5 -python-multipart==0.0.6 -referencing==0.30.2 -regex==2023.10.3 -requests-oauthlib==1.3.1 -resize-right==0.0.2 -rpds-py==0.10.6 -rsa==4.9 -safetensors==0.4.0 -scikit-image==0.22.0 -scikit-learn==1.3.0 -scipy==1.11.3 -sentry-sdk==1.32.0 -setproctitle==1.3.3 -smmap==5.0.1 -sniffio==1.3.0 -sortedcontainers==2.4.0 -soundfile==0.12.1 -soxr==0.3.7 -starlette==0.27.0 -sympy==1.12 -tbb==2021.10.0 -tensorboard==2.15.0 -tensorboard-data-server==0.7.2 -threadpoolctl==3.2.0 -tifffile==2023.9.26 -tokenizers==0.13.3 -tqdm==4.64.1 -trainer==0.0.31 -trampoline==0.1.2 -transformers==4.33.3 -triton==2.0.0 -TTS==0.19.1 -types-dataclasses==0.6.6 -typing_extensions==4.8.0 -tzlocal==5.2 -umap-learn==0.5.4 -Unidecode==1.3.7 -uvicorn==0.23.2 -uvloop==0.19.0 -wandb==0.15.12 -watchfiles==0.21.0 -websockets==12.0 -Werkzeug==3.0.1 -yarl==1.9.2 diff --git a/server/requirements.txt b/server/requirements.txt index 8a3ad11..4e4d41a 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -1,8 +1,12 @@ -TTS==0.19.1 +TTS==0.20.2 uvicorn[standard]==0.23.2 fastapi==0.95.2 deepspeed==0.10.3 pydantic==1.10.13 python-multipart==0.0.6 typing-extensions>=4.8.0 -numpy==1.24.3 \ No newline at end of file +numpy==1.24.3 +cutlet +mecab-python3==1.0.6 +unidic-lite==1.0.8 +unidic==1.1.0 \ No newline at end of file