Spaces:
Sleeping
Sleeping
FROM python:3.10-slim | |
# Set environment variables | |
ENV PIP_NO_CACHE_DIR=true \ | |
PYTHONDONTWRITEBYTECODE=1 \ | |
PYTHONUNBUFFERED=1 \ | |
NUMBA_DISABLE_CACHE=1 | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
git ffmpeg libsndfile1 build-essential python3-dev libffi-dev wget curl \ | |
&& apt-get clean | |
# Set workdir | |
WORKDIR /app | |
# Copy project files | |
COPY app.py app.py | |
COPY requirements.txt requirements.txt | |
# Install Python build tools first | |
RUN pip install --upgrade pip setuptools wheel | |
# Fix numpy for numba compatibility | |
RUN pip install numpy==1.24.3 | |
# Install whisper manually from GitHub | |
RUN pip install git+https://github.com/openai/whisper.git | |
# Install all other requirements except TTS | |
RUN pip install -r requirements.txt | |
# Install Coqui TTS separately (after dependencies) | |
RUN pip install git+https://github.com/coqui-ai/TTS.git | |
# Run the Streamlit app | |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |