User hit "Failed building wheel for tokenizers / fugashi / mecab-python3" on first install. Root cause is missing prebuilt wheels (typically Python 3.12+) and missing MeCab/Rust system tools. - Dockerfile: python:3.11-slim + MeCab + Rust, one-shot path that bypasses host setup entirely. - README: explicit "Python 3.10/3.11 OR Docker" guidance, per-error troubleshooting, OS-specific system-package commands. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
36 lines
1.0 KiB
Docker
36 lines
1.0 KiB
Docker
# MeloTTS-Korean 테스트 서버 컨테이너.
|
|
# 호스트에 Python/MeCab/Rust 안 깔고 싶을 때 사용.
|
|
#
|
|
# 빌드: docker build -t melo-test .
|
|
# 실행: docker run --rm -p 7860:7860 melo-test
|
|
# (가중치 캐시 유지하려면: -v melo-cache:/root/.cache/huggingface)
|
|
FROM python:3.11-slim
|
|
|
|
# fugashi/mecab-python3 빌드용 MeCab + tokenizers 빌드용 Rust + 기본 빌드 툴
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
git \
|
|
curl \
|
|
ca-certificates \
|
|
mecab \
|
|
libmecab-dev \
|
|
mecab-ipadic-utf8 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Rust (tokenizers 소스 빌드 fallback 대비)
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
|
| sh -s -- -y --default-toolchain stable --profile minimal
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --upgrade pip setuptools wheel \
|
|
&& pip install -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 7860
|
|
ENV PORT=7860
|
|
CMD ["python", "server.py"]
|