tao-shen commited on
Commit
2d1e174
·
verified ·
1 Parent(s): c07f579

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -21
Dockerfile CHANGED
@@ -1,29 +1,10 @@
1
- # Use Python 3.12 to avoid pydub/pyaudioop conflict in 3.13
2
- FROM python:3.12-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies (ffmpeg is critical for pydub)
8
- # Update apt lists and install in one layer to reduce image size
9
- RUN apt-get update && apt-get install -y --no-install-recommends \
10
- ffmpeg \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Copy requirements first for better caching
14
  COPY requirements.txt .
15
-
16
- # Install Python dependencies with explicit no-cache to prevent dirty builds
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # Copy the rest of the application
20
  COPY . .
21
 
22
- # Expose the port Gradio will run on
23
- EXPOSE 7860
24
-
25
- # Set environment variable to ensure Gradio listens on the correct network
26
- ENV GRADIO_SERVER_NAME="0.0.0.0"
27
-
28
- # Run the application
29
- CMD ["python", "app.py"]
 
1
+ FROM python:3.10
 
2
 
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
5
  COPY requirements.txt .
 
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . .
9
 
10
+ CMD ["bash", "scripts/entrypoint.sh"]