SkillSparkTTS / Dockerfile.cpu
jimmyyzz's picture
keep rocking
8e8cfb0 verified
Raw History Blame Contribute Delete
830 Bytes
# CPU-only variant (about 4x smaller than the CUDA image). Same service, same settings.
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg libsndfile1 git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir torch torchaudio --index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir -r requirements.txt
ENV HF_HOME=/models
ARG PRELOAD=1
RUN if [ "$PRELOAD" = "1" ]; then python -c "from huggingface_hub import snapshot_download as d; \
[d(r) for r in ('mohammedaly22/VoiceTut-TTS','eustlb/higgs-audio-v2-tokenizer','microsoft/wavlm-base-plus-sv')]" || echo 'preload skipped'; fi
COPY app.py service.py ./
COPY styles_baked/ /app/styles_baked/
ENV KR_DATA=/data PORT=8000
EXPOSE 8000
CMD ["sh", "-c", "python app.py"]