Justin commited on
Commit
c770d64
·
1 Parent(s): e6aeb9a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +43 -0
Dockerfile ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python
2
+ FROM python:3.9
3
+
4
+ # Update apt
5
+ RUN apt-get update -y
6
+
7
+ # Add apt packages
8
+ RUN apt-get install libsndfile1 curl wget git-lfs espeak-ng -y
9
+
10
+ # Deps
11
+ # RUN apt-get install libsndfile1 espeak-ng -y
12
+
13
+ # Set up a new user named "user" with user ID 1000
14
+ RUN useradd -m -u 1000 user
15
+
16
+ # Switch to the "user" user
17
+ USER user
18
+
19
+ # Set home to the user's home directory
20
+ ENV HOME=/home/user \
21
+ PATH=/home/user/.local/bin:$PATH
22
+
23
+ # Set the working directory to the user's home directory
24
+ WORKDIR $HOME/app
25
+
26
+ # Clone the GitHub repository
27
+ RUN git clone https://github.com/neural-loop/TTS.git .
28
+
29
+ RUN pip install --no-cache-dir --upgrade tts
30
+
31
+ # Install dependencies
32
+ RUN pip install --no-cache-dir -r requirements.txt
33
+
34
+ RUN git lfs install
35
+ RUN git clone https://huggingface.co/voices/VCTK_American_English_Females model
36
+
37
+ # Copy the current directory contents into the container at $HOME/app, setting the owner to the user
38
+ COPY --chown=user . $HOME/app
39
+
40
+ RUN sed -i 's/supplemental\//model\/supplemental\//g' model/config.json
41
+
42
+ # Set the command to run the server
43
+ CMD ["python", "TTS/server/server.py", "--model_path", "model/checkpoint_85000.pth", "--config_path", "model/config.json", "--port", "7860"]