ai-girlfriend / Dockerfile
jeevzz's picture
Update Dockerfile
b2932a3 verified
raw
history blame
643 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies (ffmpeg is often required for audio)
RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Copy all files from the current directory to /app
COPY . /app/
# Install dependencies
RUN uv sync --frozen
# Expose port
EXPOSE 7860
# Run app
# Note: Since main.py is in the root on HF Spaces, we use "main:app" instead of "backend.main:app"
# Added --loop asyncio to fix edge-tts issues
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--loop", "asyncio"]