jack.li commited on
Commit
08dd227
β€’
1 Parent(s): d8137a5

add docker

Browse files
Files changed (2) hide show
  1. Dockerfile +44 -0
  2. README.md +2 -4
Dockerfile ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ # Set the MKL_THREADING_LAYER environment variable to GNU
6
+ ENV MKL_THREADING_LAYER=GNU
7
+
8
+ RUN apt-get update && apt-get install -y git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev build-essential cmake
9
+
10
+ RUN useradd -m -u 1000 user
11
+
12
+ USER user
13
+
14
+ ENV HOME=/home/user \
15
+ PATH=/home/user/.local/bin:$PATH \
16
+ PYTHONPATH=$HOME/app \
17
+ PYTHONUNBUFFERED=1 \
18
+ GRADIO_ALLOW_FLAGGING=never \
19
+ GRADIO_NUM_PORTS=1 \
20
+ GRADIO_SERVER_NAME=0.0.0.0 \
21
+ GRADIO_THEME=huggingface \
22
+ GRADIO_SHARE=False \
23
+ SYSTEM=spaces
24
+
25
+ # Set the working directory to the user's home directory
26
+ WORKDIR $HOME/app
27
+
28
+ RUN pip install tqdm zipfile
29
+
30
+ RUN python download.py
31
+
32
+ COPY ./requirements.txt /tmp/requirements.txt
33
+
34
+ # Install dependencies
35
+ RUN pip install -r /tmp/requirements.txt
36
+
37
+ COPY . .
38
+
39
+ # Set the environment variable to specify the GPU device
40
+ ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
41
+ ENV CUDA_VISIBLE_DEVICES=0
42
+
43
+ # Run your app.py script
44
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -3,12 +3,10 @@ title: Multi Voice TTS(English/Chinese/Japanese)
3
  emoji: πŸ˜†πŸŒ–πŸ˜€
4
  colorFrom: purple
5
  colorTo: gray
6
- sdk: gradio
7
- sdk_version: 4.19.0
8
- app_file: app.py
9
  pinned: false
10
  license: mit
11
- short_description: '[δΈ­ζ–‡/English/ζ—₯本θͺž]multilingual text-to-speech'
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
3
  emoji: πŸ˜†πŸŒ–πŸ˜€
4
  colorFrom: purple
5
  colorTo: gray
6
+ sdk: docker
 
 
7
  pinned: false
8
  license: mit
9
+ short_description: '[δΈ­ζ–‡/English/ζ—₯本θͺž]multi language text-to-speech'
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference