voxi-lite / Dockerfile
Joshuant's picture
Voxi Lite 1.0.0: emotion tags, payal's retrained styles (plain voices unchanged), name pronunciations, clean sentence endings
6cd92e1 verified
Raw History Blame Contribute Delete
981 Bytes
# Voxi Lite server image (CPU). Build from the release folder:
# docker build -t voxi-lite:1.0.0 .
# docker run --rm -p 8080:8080 -e VOXI_THREADS=4 voxi-lite:1.0.0
# One model per container; scale with more containers (about 1.5 GB RAM each). Nothing is downloaded at runtime.
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 \
HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 \
VOXI_THREADS=4 OMP_NUM_THREADS=4 \
VOXI_WARM=/app/warm_phrases.json
WORKDIR /app
COPY requirements.txt .
RUN pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
COPY . .
RUN useradd --create-home voxi && chown -R voxi /app
USER voxi
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=90s \
CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8080/health', timeout=4).status == 200 else 1)"
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8080", "--no-access-log"]