File size: 933 Bytes
b8e2944
28dc35e
4e45873
b8e2944
4e45873
 
 
 
1322aee
4e45873
 
 
 
b8e2944
0d2182f
 
 
 
 
 
 
 
4e45873
 
 
 
0d2182f
4e45873
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use an official Python runtime as a parent image
FROM python:3.11-slim

# Set environment variables to accept the TTS licenses and handle numba caching issues
ENV TTS_ACCEPT_TOS=1
ENV TTS_LICENSE_ACCEPT=true
ENV COQUI_STUDIO_LICENSE=1
ENV COQUI_LICENSE_AGREEMENT=n
ENV NUMBA_DISABLE_CACHING=1  

# Set the working directory in the container
WORKDIR /app

# Install system dependencies for librosa
RUN apt-get update && apt-get install -y \
    libsndfile1 \
    libasound2-dev \
    libportaudio2 \
    libportaudiocpp0 \
    portaudio19-dev \
    && rm -rf /var/lib/apt/lists/*

# Copy the requirements.txt first to leverage Docker cache
COPY requirements.txt /app/

# Install the dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Copy the rest of the application code
COPY . /app

# Expose the port that Gradio will use
EXPOSE 8600

# Command to run the application
CMD ["python", "app.py", "--share"]