TTSS / Dockerfile
moustafa1-1's picture
Update Dockerfile
4da9907 verified
raw
history blame contribute delete
986 Bytes
FROM python:3.9-slim-buster
# Install system dependencies including git
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
pkg-config \
libblis-dev \
python3-dev \
wget \
git \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Set environment variables
ENV BLIS_ARCH="generic"
ENV COQUI_TTS_AGREED=1
ENV NUMBA_DISABLE_CACHE=1
# Install Coqui TTS directly from GitHub
RUN pip install --upgrade pip
RUN pip install git+https://github.com/coqui-ai/TTS.git
# Install other dependencies
COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt --timeout=300
# Copy app files
COPY local_server_new.py /app/
COPY audio/speaker_reference.wav /app/audio/speaker_reference.wav
COPY Web_Page /app/Web_Page
# Expose the port used by Hugging Face Spaces
EXPOSE 7860
# Start the FastAPI server
CMD ["python", "-m", "uvicorn", "local_server_new:app", "--host", "0.0.0.0", "--port", "7860"]