mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
Merge branch 'main' into feat/tricke-ice
This commit is contained in:
commit
abbface27a
10 changed files with 209 additions and 40 deletions
|
|
@ -1,23 +1,58 @@
|
|||
# Dockerfile
|
||||
FROM python:3.12-slim
|
||||
# Multi-stage Dockerfile
|
||||
# Stage 1: Builder - Install Python dependencies
|
||||
FROM python:3.12-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install git in builder stage (needed for pip install from git)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
ffmpeg \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and install requirements
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Install dependencies to user directory for easy copying
|
||||
RUN pip install --user --no-cache-dir -r requirements.txt && \
|
||||
# Clean up pip cache after installation
|
||||
rm -rf /root/.cache/pip
|
||||
|
||||
# Force reinstall of pipecat on every build (cache bust)
|
||||
ARG CACHEBUST=1
|
||||
RUN pip install 'git+https://github.com/dograh-hq/pipecat.git@main#egg=pipecat-ai[cartesia,deepgram,openai,elevenlabs,groq,google,azure]'
|
||||
|
||||
ARG CACHEBUST=1
|
||||
RUN pip install --user 'git+https://github.com/dograh-hq/pipecat.git@bcbd158#egg=pipecat-ai[cartesia,deepgram,openai,elevenlabs,groq,google,azure]' && \
|
||||
# Clean up pip cache after pipecat installation
|
||||
rm -rf /root/.cache/pip
|
||||
|
||||
# Remove unnecessary Python cache files from installed packages
|
||||
RUN find /root/.local -type f -name '*.pyc' -delete && \
|
||||
find /root/.local -type d -name '__pycache__' -delete && \
|
||||
find /root/.local -type f -name '*.pyo' -delete
|
||||
|
||||
# Stage 2: Runtime - Minimal image with only runtime dependencies
|
||||
FROM python:3.12-slim AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Only install ffmpeg (runtime dependency)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy Python packages from builder stage
|
||||
COPY --from=builder /root/.local /root/.local
|
||||
|
||||
# Make sure scripts in .local are available
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
|
||||
# Set Python to not generate .pyc files in runtime
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
# Unbuffered output for better container logging
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Copy application code
|
||||
COPY . ./api
|
||||
|
||||
ENV PYTHONPATH=/app
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
pipecat-ai[cartesia,deepgram,openai,elevenlabs,groq,google,azure,soundfile,silero,webrtc] @ git+https://github.com/dograh-hq/pipecat.git@9b0eba6
|
||||
pipecat-ai[cartesia,deepgram,openai,elevenlabs,groq,google,azure,soundfile,silero,webrtc] @ git+https://github.com/dograh-hq/pipecat.git@bcbd158
|
||||
langfuse==3.4.0
|
||||
fastapi==0.116.2
|
||||
asyncpg==0.30.0
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ def create_pipeline_task(pipeline, workflow_run_id, audio_config: AudioConfig =
|
|||
enable_usage_metrics=True,
|
||||
send_initial_empty_metrics=False,
|
||||
enable_heartbeats=True,
|
||||
start_metadata={"workflow_run_id": workflow_run_id},
|
||||
)
|
||||
|
||||
# If audio_config is provided, set the audio sample rates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue