Yanmife commited on
Commit
2dded51
·
verified ·
1 Parent(s): 232af4e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -9
Dockerfile CHANGED
@@ -1,18 +1,29 @@
1
  FROM python:3.10-slim
2
 
3
- # Install system dependencies
4
  RUN apt-get update && \
5
- apt-get install -y build-essential portaudio19-dev ffmpeg && \
6
- apt-get clean
 
 
 
 
 
 
7
 
8
- # Upgrade pip and install Python dependencies
9
- COPY requirements.txt /app/requirements.txt
10
  WORKDIR /app
11
- RUN pip install --upgrade pip && \
12
- pip install --no-cache-dir -r requirements.txt
13
 
14
- # Copy the rest of your app
15
- COPY . /app
 
 
 
 
 
 
 
 
16
 
17
  # Run the app
18
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies including portaudio
4
  RUN apt-get update && \
5
+ apt-get install -y \
6
+ build-essential \
7
+ portaudio19-dev \
8
+ libportaudio2 \
9
+ libportaudiocpp0 \
10
+ ffmpeg \
11
+ git \
12
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Set working directory
 
15
  WORKDIR /app
 
 
16
 
17
+ # Copy requirements and install dependencies
18
+ COPY requirements.txt .
19
+ RUN pip install --upgrade pip
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy the rest of the code
23
+ COPY . .
24
+
25
+ # Expose the port for Gradio (optional for local dev)
26
+ EXPOSE 7860
27
 
28
  # Run the app
29
  CMD ["python", "app.py"]