pipecat-livekit / Dockerfile
peacepeacecreation
Add local/ module
a2b0d2f
Raw History Blame Contribute Delete
1.2 kB
# Dockerfile for Hugging Face Spaces
# Pipecat LiveKit Server
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user (required by HF Spaces)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set working directory
WORKDIR $HOME/app
# Install uv for fast dependency management
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Copy project files
COPY --chown=user:user pyproject.toml uv.lock ./
COPY --chown=user:user *.py ./
COPY --chown=user:user services/ ./services/
COPY --chown=user:user core/ ./core/
COPY --chown=user:user utils/ ./utils/
COPY --chown=user:user metrics/ ./metrics/
COPY --chown=user:user livekit_server/ ./livekit_server/
COPY --chown=user:user local/ ./local/
# Install dependencies (frozen to use lockfile)
RUN $HOME/.local/bin/uv sync --frozen --no-dev
# Expose port (HF Spaces uses 7860 by default)
EXPOSE 7860
# Set environment variables
ENV HOST=0.0.0.0
ENV PORT=7860
# Run the LiveKit server
CMD ["sh", "-c", "$HOME/.local/bin/uv run python livekit_server/server.py"]