| FROM python:3.11-slim | |
| WORKDIR /app | |
| ENV COQUI_TOS_AGREED=1 | |
| ENV COQUI_TOS_ACCEPTED=1 | |
| ENV TTS_HOME=/app/.tts | |
| ENV HF_HOME=/app/.cache/huggingface | |
| ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/transformers | |
| RUN mkdir -p /app/.tts /app/.cache/huggingface && chmod -R 777 /app/.tts /app/.cache | |
| RUN apt-get update && apt-get install -y \ | |
| git git-lfs ffmpeg \ | |
| pkg-config \ | |
| build-essential python3-dev \ | |
| libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev \ | |
| libswresample-dev libswscale-dev \ | |
| libgl1 libsm6 libxext6 \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && git lfs install | |
| RUN pip install --no-cache-dir -U pip setuptools wheel | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/* | |
| COPY . /app | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |