[Bug] Docker build failure: AttributeError in botocore.exceptions (HTTPClientError)
The Docker build fails during the model download initialization step because of a version mismatch between botocore and cached-path. It seems the latest botocore has removed HTTPClientError, which cached-path (v1.5.0 and below) still references.
Traceback (most recent call last): File "/app/melo/init_downloads.py", line 5, in <module> from melo.api import TTS File "/app/melo/api.py", line 18, in <module> from .download_utils import load_or_download_config, load_or_download_model File "/app/melo/download_utils.py", line 4, in <module> from cached_path import cached_path File "/usr/local/lib/python3.9/site-packages/cached_path/__init__.py", line 13, in <module> from ._cached_path import cached_path File "/usr/local/lib/python3.9/site-packages/cached_path/_cached_path.py", line 15, in <module> from .schemes import ( File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/__init__.py", line 9, in <module> from .r2 import R2Client File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/r2.py", line 19, in <module> class R2Client(SchemeClient): File "/usr/local/lib/python3.9/site-packages/cached_path/schemes/r2.py", line 21, in R2Client botocore.exceptions.HTTPClientError, AttributeError: module 'botocore.exceptions' has no attribute 'HTTPClientError'
Environment: Docker Base Image: python:3.9-slim Hardware: Mac (Apple Silicon)
Explicitly pinning the versions in the Dockerfile before installing the package fixes the issue:
RUN pip install botocore==1.31.17 boto3==1.28.17 cached-path==1.5.0
Source: myshell-ai/MeloTTS