fffiloni commited on
Commit
57ddc9e
1 Parent(s): a58da8c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -0
Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ RUN apt-get update && apt-get install -y git wget
6
+
7
+ RUN useradd -m -u 1000 user
8
+
9
+ USER user
10
+
11
+ ENV HOME=/home/user \
12
+ PATH=/home/user/.local/bin:$PATH \
13
+ PYTHONPATH=$HOME/app \
14
+ PYTHONUNBUFFERED=1 \
15
+ GRADIO_ALLOW_FLAGGING=never \
16
+ GRADIO_NUM_PORTS=1 \
17
+ GRADIO_SERVER_NAME=0.0.0.0 \
18
+ GRADIO_THEME=huggingface \
19
+ GRADIO_SHARE=False \
20
+ SYSTEM=spaces
21
+
22
+ # Set the working directory to the user's home directory
23
+ WORKDIR $HOME/app
24
+
25
+ RUN git clone -b dev https://github.com/camenduru/dreamtalk $HOME/app
26
+
27
+ RUN wget https://huggingface.co/camenduru/dreamtalk/resolve/main/damo/dreamtalk/checkpoints/denoising_network.pth -O $HOME/app/checkpoints/denoising_network.pth
28
+ RUN wget https://huggingface.co/camenduru/dreamtalk/resolve/main/damo/dreamtalk/checkpoints/renderer.pt -O $HOME/app/checkpoints/renderer.pt
29
+
30
+ RUN pip install -q yacs av gradio
31
+
32
+ COPY app.py .
33
+
34
+ # Set the environment variable to specify the GPU device
35
+ ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
36
+ ENV CUDA_VISIBLE_DEVICES=0
37
+
38
+ # Run your app.py script
39
+ CMD ["python", "app.py"]