10 lines
595 B
Docker
10 lines
595 B
Docker
FROM python:3.12-slim
|
|
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 CUDA_VISIBLE_DEVICES="" OMP_NUM_THREADS=4 MKL_NUM_THREADS=4
|
|
RUN apt-get update && apt-get install -y --no-install-recommends espeak-ng libsndfile1 && rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /opt/app
|
|
COPY requirements.txt /tmp/tts-requirements.txt
|
|
RUN pip install --no-cache-dir torch==2.13.0 --index-url https://download.pytorch.org/whl/cpu && pip install --no-cache-dir -r /tmp/tts-requirements.txt
|
|
COPY app.py synthesize.py ./
|
|
USER 1013:1014
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8001", "--workers", "1"]
|