ishworrsubedii commited on
Commit
31b53a3
·
verified ·
1 Parent(s): 6375da0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -4,11 +4,12 @@ FROM python:3.9-slim
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies required for PyAudio, ffmpeg, and virtual audio devices
8
  RUN apt-get update && \
9
  apt-get install -y \
10
  python3-dev portaudio19-dev ffmpeg \
11
  alsa-utils alsa-oss alsa-tools pulseaudio \
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Set up a virtual audio device (for environments without physical audio hardware)
@@ -19,7 +20,8 @@ RUN echo "pcm.!default { type hw card 0 }" > /etc/asound.conf && \
19
  COPY . .
20
 
21
  # Install Python dependencies
22
- RUN pip install --no-cache-dir -r requirements.txt
 
23
 
24
  # Expose the necessary port
25
  EXPOSE 7860
@@ -28,4 +30,4 @@ EXPOSE 7860
28
  ENV PULSE_SERVER unix:/run/user/1000/pulse/native
29
 
30
  # Set the default command to run the application
31
- CMD ["python", "app.py"]
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies required for PyAudio, ffmpeg, virtual audio devices, and build tools
8
  RUN apt-get update && \
9
  apt-get install -y \
10
  python3-dev portaudio19-dev ffmpeg \
11
  alsa-utils alsa-oss alsa-tools pulseaudio \
12
+ build-essential \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  # Set up a virtual audio device (for environments without physical audio hardware)
 
20
  COPY . .
21
 
22
  # Install Python dependencies
23
+ RUN pip install --no-cache-dir --upgrade pip && \
24
+ pip install --no-cache-dir -r requirements.txt
25
 
26
  # Expose the necessary port
27
  EXPOSE 7860
 
30
  ENV PULSE_SERVER unix:/run/user/1000/pulse/native
31
 
32
  # Set the default command to run the application
33
+ CMD ["python", "app.py"]