# Use Python 3.10 (TTS compatible) FROM python:3.10-slim WORKDIR /app # System dependencies RUN apt-get update && apt-get install -y \ git \ git-lfs \ ffmpeg \ libsm6 \ libxext6 \ cmake \ rsync \ libgl1 \ curl \ && git lfs install \ && rm -rf /var/lib/apt/lists/* # Upgrade pip RUN pip install --no-cache-dir --upgrade pip # Install Node.js (for Gradio frontend) RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y nodejs \ && rm -rf /var/lib/apt/lists/* # Copy project files COPY . /app # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt \ && pip install --no-cache-dir torch==2.2.2+cpu torchvision==0.17.0+cpu torchaudio==2.2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html # Expose Gradio port EXPOSE 7860 # Run app CMD ["python", "app.py"]