fix(melo-test): unidic download is mandatory, not optional

User got past wheel build, then hit at startup:

  RuntimeError: Failed initializing MeCab
  [ifs] no such file or directory:
      .../site-packages/unidic/dicdir/mecabrc

Root cause: MeloTTS's text/cleaner.py unconditionally imports the
japanese module, which initializes MeCab.Tagger() at module load
time. So even Korean-only use needs the unidic dictionary data,
which is a separate ~250MB download.

- README: add explicit `python -m unidic download` step after
  pip install, and a troubleshooting entry for the mecabrc error.
- Dockerfile: run `python -m unidic download` during image build so
  the container is usable immediately.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude Owner
2026-05-26 20:45:24 +09:00
parent e7224d0670
commit 2bed5f38b7
2 changed files with 15 additions and 1 deletions

View File

@@ -28,6 +28,10 @@ COPY requirements.txt .
RUN pip install --upgrade pip setuptools wheel \
&& pip install -r requirements.txt
# unidic 사전 데이터 (~250MB). MeloTTS 가 한국어만 써도 임포트 시점에
# 일본어 MeCab Tagger 를 무조건 초기화하므로 생략 불가.
RUN python -m unidic download
COPY . .
EXPOSE 7860