wetdog commited on
Commit
cde96b8
·
1 Parent(s): c50d394

Add dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +48 -0
Dockerfile ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # Onnx install
38
+
39
+ COPY --chown=user requirements.txt $HOME/app/
40
+
41
+ RUN pip install -r requirements.txt
42
+
43
+ COPY --chown=user . $HOME/app/
44
+ EXPOSE 7860
45
+
46
+ CMD ["python3", "-u", "infer_onnx.py"]
47
+
48
+