File size: 1,079 Bytes
8270162
c118878
 
 
 
 
 
81bc8fe
 
 
 
 
 
 
 
 
 
 
 
c118878
81bc8fe
 
 
 
 
 
 
 
 
 
c118878
81bc8fe
5850686
d060f35
81bc8fe
 
 
 
 
 
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
38
39
40
FROM debian:11

# Agrega un usuario no root
RUN useradd -m -u 1000 app

# Establece el directorio de trabajo dentro del contenedor
WORKDIR /home/app

RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    python3-venv \
    git espeak-ng

RUN git clone https://github.com/rhasspy/piper
RUN pip install -q cython>=0.29.0 espeak-phonemizer>=1.1.0 librosa>=0.9.2 numpy>=1.19.0 pytorch-lightning~=1.7.0 torch~=1.11.0
RUN pip install -q onnx onnxruntime
RUN pip install -q torchtext==0.12.0

WORKDIR /home/app/piper/src/python
RUN bash build_monotonic_align.sh
RUN pip install -q torchaudio==0.11.0 torchmetrics==0.11.4
RUN pip install --upgrade gdown
RUN apt install -y zip unzip wget curl
RUN mkdir models

# Install Flask and other required packages
RUN pip install flask flask-socketio flask-apscheduler huggingface_hub

# Copy the application files
WORKDIR /home/app
COPY app.py .
RUN mkdir templates
COPY index.html ./templates/

# Set environment variable for Flask
ENV FLASK_APP=app.py

# Run the Flask app with SocketIO
CMD ["python3", "-u", "app.py"]