wetdog commited on
Commit
396b4b5
1 Parent(s): bc8da56

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +51 -0
Dockerfile ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10.12-slim
3
+
4
+ # Install required packages for building eSpeak and general utilities
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ autoconf \
8
+ automake \
9
+ libtool \
10
+ pkg-config \
11
+ git \
12
+ cmake \
13
+ ffmpeg \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # eSpeak install
17
+ RUN git clone -b dev-ca https://github.com/projecte-aina/espeak-ng
18
+
19
+ RUN pip install --upgrade pip && \
20
+ cd espeak-ng && \
21
+ ./autogen.sh && \
22
+ ./configure --prefix=/usr && \
23
+ make && \
24
+ make install
25
+
26
+ RUN mkdir -p cache && chmod 777 cache
27
+
28
+ RUN useradd -m -u 1000 user
29
+
30
+ USER user
31
+
32
+ ENV HOME=/home/user \
33
+ PATH=/home/user/.local/bin:$PATH
34
+
35
+ # Set the working directory to the user's home directory
36
+ WORKDIR $HOME/app
37
+ # vits2 install
38
+ RUN git clone -b dev-cat https://github.com/langtech-bsc/vits2_pytorch $HOME/app/vits2_pytorch
39
+
40
+ RUN cd $HOME/app/vits2_pytorch && \
41
+ pip install -r requirements.txt --no-cache && \
42
+ cd monotonic_align && \
43
+ python setup.py build_ext --inplace
44
+
45
+ COPY --chown=user . $HOME/app/vits2_pytorch/
46
+
47
+ EXPOSE 7860
48
+
49
+ CMD ["python3", "-u", "vits2_pytorch/app.py"]
50
+
51
+