SalexAI commited on
Commit
c4d7a49
·
verified ·
1 Parent(s): c66f9df

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -4
Dockerfile CHANGED
@@ -1,16 +1,24 @@
1
  FROM python:3.11-slim
2
 
3
  ENV PYTHONDONTWRITEBYTECODE=1 \
4
- PYTHONUNBUFFERED=1
 
5
 
6
  WORKDIR /app
7
 
 
 
 
 
 
8
  COPY requirements.txt /app/requirements.txt
9
- RUN pip install --no-cache-dir -r /app/requirements.txt
 
 
 
 
10
 
11
  COPY app /app/app
12
 
13
- # Hugging Face Spaces expect the service on 7860
14
  EXPOSE 7860
15
-
16
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.11-slim
2
 
3
  ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_NO_CACHE_DIR=1
6
 
7
  WORKDIR /app
8
 
9
+ # System deps that help audio stacks (optional but nice)
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ ffmpeg \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
  COPY requirements.txt /app/requirements.txt
15
+
16
+ # Force reinstall to avoid any preinstalled/bundled gradio mismatches
17
+ RUN pip install --upgrade pip setuptools wheel && \
18
+ pip uninstall -y gradio gradio-client || true && \
19
+ pip install --no-cache-dir --force-reinstall -r /app/requirements.txt
20
 
21
  COPY app /app/app
22
 
 
23
  EXPOSE 7860
 
24
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]