From 7ea61e04f96ba2c5268ac6f82e8f9e865bba7e04 Mon Sep 17 00:00:00 2001 From: vikas809028 Date: Wed, 10 Sep 2025 23:41:25 +0530 Subject: [PATCH] fix: add gcc and build tools to Dockerfile to support webrtcvad build --- Dockerfile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c2ff68f..78086d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,25 @@ FROM python:3.10-slim # Set the working directory in the container to /app WORKDIR /app -# Copy the local directory contents into the container -COPY . . +# Install system dependencies needed for building wheels (gcc, build-essential, python headers) +RUN apt-get update && apt-get install -y \ + gcc \ + build-essential \ + python3-dev \ + && rm -rf /var/lib/apt/lists/* + +# Copy only requirements first to leverage Docker cache +COPY requirements.txt . + +# Upgrade pip (recommended to avoid build issues) +RUN pip install --upgrade pip # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt +# Copy the rest of the application +COPY . . + # Expose port 7860 to access the app EXPOSE 7860 ENV GRADIO_SERVER_NAME="0.0.0.0"