jeevzz commited on
Commit
aef1e37
·
verified ·
1 Parent(s): 3a0aba1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -1,17 +1,21 @@
1
  FROM python:3.10-slim
2
  WORKDIR /app
3
 
 
 
 
4
  # Install uv
5
  COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
6
 
7
- # Copy files (flat structure, no backend folder)
8
- COPY pyproject.toml uv.lock ./
9
- COPY chat.py database.py main.py voice.py ./
10
 
11
  # Install dependencies
12
  RUN uv sync --frozen
13
 
 
14
  EXPOSE 7860
15
 
16
- # Run app - using module name directly
17
- CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
  WORKDIR /app
3
 
4
+ # Install system dependencies (ffmpeg is often required for audio)
5
+ RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
6
+
7
  # Install uv
8
  COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
9
 
10
+ # Copy all files from the current directory to /app
11
+ COPY . /app/
 
12
 
13
  # Install dependencies
14
  RUN uv sync --frozen
15
 
16
+ # Expose port
17
  EXPOSE 7860
18
 
19
+ # Run app
20
+ # Note: Since main.py is in the root on HF Spaces, we use "main:app" instead of "backend.main:app"
21
+ CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]