Uniaff commited on
Commit
0d2182f
·
verified ·
1 Parent(s): 23b86c0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -3
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9
3
 
4
  # Set environment variables to accept the TTS licenses
5
  ENV TTS_ACCEPT_TOS=1
@@ -10,11 +10,20 @@ ENV COQUI_LICENSE_AGREEMENT=n
10
  # Set the working directory in the container
11
  WORKDIR /app
12
 
 
 
 
 
 
 
 
 
 
13
  # Copy the requirements.txt first to leverage Docker cache
14
  COPY requirements.txt /app/
15
 
16
  # Install the dependencies
17
- RUN pip install --no-cache-dir -r requirements.txt
18
 
19
  # Copy the rest of the application code
20
  COPY . /app
 
1
+ # Use a slim official Python runtime as a parent image
2
+ FROM python:3.9-slim
3
 
4
  # Set environment variables to accept the TTS licenses
5
  ENV TTS_ACCEPT_TOS=1
 
10
  # Set the working directory in the container
11
  WORKDIR /app
12
 
13
+ # Install system dependencies
14
+ RUN apt-get update && apt-get install -y \
15
+ libsndfile1 \
16
+ libasound2-dev \
17
+ libportaudio2 \
18
+ libportaudiocpp0 \
19
+ portaudio19-dev \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
  # Copy the requirements.txt first to leverage Docker cache
23
  COPY requirements.txt /app/
24
 
25
  # Install the dependencies
26
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
27
 
28
  # Copy the rest of the application code
29
  COPY . /app