Fix MeloTTS Docker install
Browse filesRemove the broken PyPI melotts install and install MeloTTS from the official GitHub repo in the Space Dockerfile, including the required init_downloads step.
- Dockerfile +5 -0
- README.md +1 -1
- requirements-melo.txt +2 -3
- requirements.txt +0 -1
Dockerfile
CHANGED
|
@@ -34,6 +34,9 @@ WORKDIR /app
|
|
| 34 |
COPY --chown=user:user requirements.txt requirements-melo.txt ./
|
| 35 |
RUN pip install -r requirements.txt
|
| 36 |
|
|
|
|
|
|
|
|
|
|
| 37 |
COPY --chown=user:user . /app
|
| 38 |
|
| 39 |
RUN mkdir -p /app/models/supertonic-2 /app/models/kokoro /app/models/hf-cache /tmp/tts-server /store && \
|
|
@@ -58,6 +61,8 @@ PY
|
|
| 58 |
|
| 59 |
RUN python -m unidic download
|
| 60 |
|
|
|
|
|
|
|
| 61 |
RUN python - <<'PY'
|
| 62 |
from melo.api import TTS
|
| 63 |
TTS(language='EN', device='cpu', use_hf=True)
|
|
|
|
| 34 |
COPY --chown=user:user requirements.txt requirements-melo.txt ./
|
| 35 |
RUN pip install -r requirements.txt
|
| 36 |
|
| 37 |
+
RUN git clone https://github.com/myshell-ai/MeloTTS.git /tmp/MeloTTS && \
|
| 38 |
+
pip install -e /tmp/MeloTTS
|
| 39 |
+
|
| 40 |
COPY --chown=user:user . /app
|
| 41 |
|
| 42 |
RUN mkdir -p /app/models/supertonic-2 /app/models/kokoro /app/models/hf-cache /tmp/tts-server /store && \
|
|
|
|
| 61 |
|
| 62 |
RUN python -m unidic download
|
| 63 |
|
| 64 |
+
RUN python /tmp/MeloTTS/melo/init_downloads.py
|
| 65 |
+
|
| 66 |
RUN python - <<'PY'
|
| 67 |
from melo.api import TTS
|
| 68 |
TTS(language='EN', device='cpu', use_hf=True)
|
README.md
CHANGED
|
@@ -67,5 +67,5 @@ Then open `http://localhost:7860`.
|
|
| 67 |
## MeloTTS EN-only scaffold
|
| 68 |
|
| 69 |
- The repo includes a `melo-en` engine scaffold.
|
| 70 |
-
- MeloTTS is installed in the default Space image at build time.
|
| 71 |
- The model is enabled by default in the Space image via `ENABLE_MELO_TTS=true`.
|
|
|
|
| 67 |
## MeloTTS EN-only scaffold
|
| 68 |
|
| 69 |
- The repo includes a `melo-en` engine scaffold.
|
| 70 |
+
- MeloTTS is installed in the default Space image from the official GitHub repo at build time.
|
| 71 |
- The model is enabled by default in the Space image via `ENABLE_MELO_TTS=true`.
|
requirements-melo.txt
CHANGED
|
@@ -1,3 +1,2 @@
|
|
| 1 |
-
# MeloTTS
|
| 2 |
-
#
|
| 3 |
-
melotts==0.1.1
|
|
|
|
| 1 |
+
# MeloTTS is installed from the official GitHub repo in the Space Dockerfile.
|
| 2 |
+
# The PyPI `melotts==0.1.1` sdist is currently broken for non-interactive Docker builds.
|
|
|
requirements.txt
CHANGED
|
@@ -13,4 +13,3 @@ pytest==8.4.1
|
|
| 13 |
httpx==0.28.1
|
| 14 |
python-multipart==0.0.20
|
| 15 |
jinja2>=3.0.0
|
| 16 |
-
melotts==0.1.1
|
|
|
|
| 13 |
httpx==0.28.1
|
| 14 |
python-multipart==0.0.20
|
| 15 |
jinja2>=3.0.0
|
|
|