Justin commited on
Commit
ba903a4
1 Parent(s): 10dddd8

Create Dockerfile

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