VoiceStudio / Dockerfile
DillonLD's picture
Create Dockerfile
27803ad verified
Raw History Blame Contribute Delete
826 Bytes
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
HF_HOME=/data/.cache/huggingface \
HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg libsndfile1 libgomp1 git \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -u 1000 user \
&& mkdir -p /data/.cache/huggingface \
&& chown -R user:user /data
WORKDIR /home/user/app
COPY --chown=user:user . .
USER user
RUN python -m pip install --user --no-cache-dir --upgrade pip \
&& python -m pip install --user --no-cache-dir chatterbox-tts --no-deps \
&& python -m pip install --user --no-cache-dir \
-r requirements-tts.txt -r requirements.txt
EXPOSE 7860
CMD ["sh", "-c", "cd /data && exec python /home/user/app/Studio.py --host 0.0.0.0 --port 7860 --no-browser"]