OrbitMC commited on
Commit
5c919ff
·
verified ·
1 Parent(s): 1030e25

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -1,9 +1,8 @@
1
  FROM python:3.11-slim
2
 
3
- # Install system dependencies (ffmpeg is useful for audio manipulation if needed)
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
- ffmpeg \
6
- git \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
  # HF Spaces requires uid 1000
@@ -14,8 +13,7 @@ ENV HF_HOME="/home/user/.cache/huggingface"
14
 
15
  WORKDIR /home/user/app
16
 
17
- # Combine Requirements into Dockerfile
18
- # Using PyTorch CPU-only to save space
19
  RUN pip install --no-cache-dir --upgrade pip && \
20
  pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu \
21
  torch==2.6.0+cpu \
@@ -23,11 +21,14 @@ RUN pip install --no-cache-dir --upgrade pip && \
23
  accelerate>=1.3.0 \
24
  flask==3.1.1 \
25
  huggingface_hub>=0.27.0 \
26
- edge-tts \
27
- asyncio
28
 
 
29
  COPY --chown=user:user . .
30
 
 
 
 
31
  EXPOSE 7860
32
 
33
  CMD ["python", "app.py"]
 
1
  FROM python:3.11-slim
2
 
3
+ # System deps
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ ffmpeg git \
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  # HF Spaces requires uid 1000
 
13
 
14
  WORKDIR /home/user/app
15
 
16
+ # Install Python deps — CPU-only torch to save memory
 
17
  RUN pip install --no-cache-dir --upgrade pip && \
18
  pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu \
19
  torch==2.6.0+cpu \
 
21
  accelerate>=1.3.0 \
22
  flask==3.1.1 \
23
  huggingface_hub>=0.27.0 \
24
+ edge-tts
 
25
 
26
+ # Copy project files (includes app.py and img/ folder)
27
  COPY --chown=user:user . .
28
 
29
+ # Make sure img dir exists even if empty (default.png must be inside)
30
+ RUN mkdir -p /home/user/app/img
31
+
32
  EXPOSE 7860
33
 
34
  CMD ["python", "app.py"]