myshell-ai / MeloTTS

High-quality multi-lingual text-to-speech library by MyShell.ai. Support English, Spanish, French, Chinese, Japanese and Korean.
MIT License
4.46k stars 557 forks source link

Error during Docker installation #108

Closed Omenranr closed 5 months ago

Omenranr commented 5 months ago

Hello,

I tried installing MeloTTS using the Docker installation and I got this issue:

audio-books-project % git clone https://github.com/myshell-ai/MeloTTS.git
cd MeloTTS
docker build -t melotts .
Cloning into 'MeloTTS'...
remote: Enumerating objects: 400, done.
remote: Counting objects: 100% (115/115), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 400 (delta 95), reused 82 (delta 72), pack-reused 285
Receiving objects: 100% (400/400), 6.04 MiB | 12.01 MiB/s, done.
Resolving deltas: 100% (196/196), done.
[+] Building 828.3s (12/12) FINISHED                                                                                                             docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                             0.0s
 => => transferring dockerfile: 355B                                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/python:3.9-slim                                                                                               1.0s
 => [auth] library/python:pull token for registry-1.docker.io                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                                  0.0s
 => [1/7] FROM docker.io/library/python:3.9-slim@sha256:fd8693fc6115345452a19654c1388bc9a1029cda7b98e1bce45ede67e74190f0                                         0.0s
 => [internal] load build context                                                                                                                                0.4s
 => => transferring context: 28.95MB                                                                                                                             0.4s
 => CACHED [2/7] WORKDIR /app                                                                                                                                    0.0s
 => [3/7] COPY . /app                                                                                                                                            0.1s
 => [4/7] RUN apt-get update && apt-get install -y     build-essential libsndfile1     && rm -rf /var/lib/apt/lists/*                                           10.7s
 => [5/7] RUN pip install -e .                                                                                                                                 573.2s 
 => [6/7] RUN python -m unidic download                                                                                                                        228.5s 
 => ERROR [7/7] RUN python melo/init_downloads.py                                                                                                               14.3s 
------                                                                                                                                                                
 > [7/7] RUN python melo/init_downloads.py:                                                                                                                           
3.633 [nltk_data] Downloading package averaged_perceptron_tagger to                                                                                                   
3.633 [nltk_data]     /root/nltk_data...                                                                                                                              
3.841 [nltk_data]   Unzipping taggers/averaged_perceptron_tagger.zip.                                                                                                 
3.885 [nltk_data] Downloading package cmudict to /root/nltk_data...                                                                                                   
4.130 [nltk_data]   Unzipping corpora/cmudict.zip.
13.24 Traceback (most recent call last):
13.24   File "/app/melo/init_downloads.py", line 5, in <module>
13.24     from melo.api import TTS
13.24   File "/app/melo/api.py", line 18, in <module>
13.24     from .download_utils import load_or_download_config, load_or_download_model
13.24   File "/app/melo/download_utils.py", line 4, in <module>
13.24     from cached_path import cached_path
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/__init__.py", line 13, in <module>
13.24     from ._cached_path import cached_path
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/_cached_path.py", line 15, in <module>
13.24     from .schemes import (
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/__init__.py", line 6, in <module>
13.24     from .s3 import S3Client
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/s3.py", line 16, in <module>
13.24     class S3Client(SchemeClient):
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/s3.py", line 18, in S3Client
13.24     botocore.exceptions.HTTPClientError,
13.24 AttributeError: module 'botocore.exceptions' has no attribute 'HTTPClientError'
------
Dockerfile:11
--------------------
   9 |     RUN pip install -e .
  10 |     RUN python -m unidic download
  11 | >>> RUN python melo/init_downloads.py
  12 |     
  13 |     CMD ["python", "./melo/app.py", "--host", "0.0.0.0", "--port", "8888"]
--------------------
ERROR: failed to solve: process "/bin/sh -c python melo/init_downloads.py" did not complete successfully: exit code: 1

The botocore and boto3 libraries took a lot of time to be installed because it was searching for good version.

Any idea about the issue ? Thanks.

gushuaialan1 commented 5 months ago

Hello,

I tried installing MeloTTS using the Docker installation and I got this issue:

audio-books-project % git clone https://github.com/myshell-ai/MeloTTS.git
cd MeloTTS
docker build -t melotts .
Cloning into 'MeloTTS'...
remote: Enumerating objects: 400, done.
remote: Counting objects: 100% (115/115), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 400 (delta 95), reused 82 (delta 72), pack-reused 285
Receiving objects: 100% (400/400), 6.04 MiB | 12.01 MiB/s, done.
Resolving deltas: 100% (196/196), done.
[+] Building 828.3s (12/12) FINISHED                                                                                                             docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                             0.0s
 => => transferring dockerfile: 355B                                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/python:3.9-slim                                                                                               1.0s
 => [auth] library/python:pull token for registry-1.docker.io                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                                  0.0s
 => [1/7] FROM docker.io/library/python:3.9-slim@sha256:fd8693fc6115345452a19654c1388bc9a1029cda7b98e1bce45ede67e74190f0                                         0.0s
 => [internal] load build context                                                                                                                                0.4s
 => => transferring context: 28.95MB                                                                                                                             0.4s
 => CACHED [2/7] WORKDIR /app                                                                                                                                    0.0s
 => [3/7] COPY . /app                                                                                                                                            0.1s
 => [4/7] RUN apt-get update && apt-get install -y     build-essential libsndfile1     && rm -rf /var/lib/apt/lists/*                                           10.7s
 => [5/7] RUN pip install -e .                                                                                                                                 573.2s 
 => [6/7] RUN python -m unidic download                                                                                                                        228.5s 
 => ERROR [7/7] RUN python melo/init_downloads.py                                                                                                               14.3s 
------                                                                                                                                                                
 > [7/7] RUN python melo/init_downloads.py:                                                                                                                           
3.633 [nltk_data] Downloading package averaged_perceptron_tagger to                                                                                                   
3.633 [nltk_data]     /root/nltk_data...                                                                                                                              
3.841 [nltk_data]   Unzipping taggers/averaged_perceptron_tagger.zip.                                                                                                 
3.885 [nltk_data] Downloading package cmudict to /root/nltk_data...                                                                                                   
4.130 [nltk_data]   Unzipping corpora/cmudict.zip.
13.24 Traceback (most recent call last):
13.24   File "/app/melo/init_downloads.py", line 5, in <module>
13.24     from melo.api import TTS
13.24   File "/app/melo/api.py", line 18, in <module>
13.24     from .download_utils import load_or_download_config, load_or_download_model
13.24   File "/app/melo/download_utils.py", line 4, in <module>
13.24     from cached_path import cached_path
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/__init__.py", line 13, in <module>
13.24     from ._cached_path import cached_path
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/_cached_path.py", line 15, in <module>
13.24     from .schemes import (
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/__init__.py", line 6, in <module>
13.24     from .s3 import S3Client
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/s3.py", line 16, in <module>
13.24     class S3Client(SchemeClient):
13.24   File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/s3.py", line 18, in S3Client
13.24     botocore.exceptions.HTTPClientError,
13.24 AttributeError: module 'botocore.exceptions' has no attribute 'HTTPClientError'
------
Dockerfile:11
--------------------
   9 |     RUN pip install -e .
  10 |     RUN python -m unidic download
  11 | >>> RUN python melo/init_downloads.py
  12 |     
  13 |     CMD ["python", "./melo/app.py", "--host", "0.0.0.0", "--port", "8888"]
--------------------
ERROR: failed to solve: process "/bin/sh -c python melo/init_downloads.py" did not complete successfully: exit code: 1

The botocore and boto3 libraries took a lot of time to be installed because it was searching for good version.

Any idea about the issue ? Thanks.

Try modifying the requirements.txt file to include botocore==1.34.88 cached_path==1.6.2

Omenranr commented 5 months ago

This solved the issue thanks.