Spaces:
Runtime error
Runtime error
File size: 1,202 Bytes
24cdea4 a2b0d2f 24cdea4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # 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"]
|