File size: 643 Bytes
4832b3b
 
 
aef1e37
 
 
4832b3b
 
 
aef1e37
 
4832b3b
 
 
 
aef1e37
4832b3b
 
aef1e37
 
b2932a3
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"]