Files
TalkEdit/Dockerfile
Your Name efee0b0abe fix: Resolve protobuf dependency conflict for pyannote.audio 4.x
- Update protobuf from <5.0.0 to >=5.0.0 (required by opentelemetry-proto)
- Update streamlit minimum version to >=1.30.0 (protobuf 5.x compatible)
- Update regular Dockerfile to match GPU dockerfile structure
- Install PyTorch CPU version in regular Dockerfile for consistency
2026-01-05 11:30:56 -05:00

47 lines
1.3 KiB
Docker

FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
wget \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better Docker layer caching
COPY requirements.txt .
# Upgrade pip and install build tools
RUN pip install --upgrade pip setuptools wheel
# Install PyTorch CPU version first (for non-GPU builds)
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# Install remaining Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create directories for mounted volumes
RUN mkdir -p /app/data/videos /app/data/outputs /app/data/cache
# Set environment variables
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Expose Streamlit port
EXPOSE 8501
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8501/_stcore/health || exit 1
# Start the application
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]