FROM python:3.10-slim RUN apt-get update && apt-get install -y \ git \ && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 appuser USER appuser ENV PATH="/home/appuser/.local/bin:$PATH" WORKDIR /app RUN git clone https://github.com/myshell-ai/MeloTTS.git WORKDIR /app/MeloTTS RUN pip install --no-cache-dir -e . RUN python -m unidic download RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng')" WORKDIR /app COPY --chown=appuser ./requirements.txt requirements.txt RUN pip install --no-cache-dir -r requirements.txt COPY --chown=appuser . /app CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]