Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +3 -6
Dockerfile
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel
|
3 |
|
4 |
# Add NVIDIA CUDA GPG key
|
5 |
-
# Add NVIDIA CUDA GPG key using a different key server
|
6 |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key A4B469963BF863CC
|
7 |
|
8 |
# Install Git and system libraries required for OpenGL without interactive prompts
|
@@ -45,8 +44,7 @@ RUN git clone -b main https://github.com/ashpexx/make-vid-talk $HOME/app
|
|
45 |
RUN pip install torch==2.0.0+cu117 torchvision==0.15.0+cu117 -f https://download.pytorch.org/whl/torch_stable.html
|
46 |
|
47 |
# Install dependencies
|
48 |
-
|
49 |
-
RUN pip install --no-cache-dir -r requirements.txt moviepy
|
50 |
|
51 |
# Download checkpoint files using aria2
|
52 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/video-retalking/resolve/main/30_net_gen.pth -d $HOME/app/checkpoints -o 30_net_gen.pth
|
@@ -63,7 +61,6 @@ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co
|
|
63 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/video-retalking/resolve/main/shape_predictor_68_face_landmarks.dat -d $HOME/app/checkpoints -o shape_predictor_68_face_landmarks.dat
|
64 |
RUN unzip -d $HOME/app/checkpoints/BFM $HOME/app/checkpoints/BFM.zip
|
65 |
|
66 |
-
|
67 |
# Ensure the compiled CUDA code can be found
|
68 |
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
69 |
|
@@ -75,5 +72,5 @@ ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
|
75 |
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
76 |
ENV CUDA_VISIBLE_DEVICES=0
|
77 |
|
78 |
-
# Run your app
|
79 |
-
CMD ["
|
|
|
2 |
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel
|
3 |
|
4 |
# Add NVIDIA CUDA GPG key
|
|
|
5 |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key A4B469963BF863CC
|
6 |
|
7 |
# Install Git and system libraries required for OpenGL without interactive prompts
|
|
|
44 |
RUN pip install torch==2.0.0+cu117 torchvision==0.15.0+cu117 -f https://download.pytorch.org/whl/torch_stable.html
|
45 |
|
46 |
# Install dependencies
|
47 |
+
RUN pip install --no-cache-dir -r requirements.txt moviepy gunicorn
|
|
|
48 |
|
49 |
# Download checkpoint files using aria2
|
50 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/video-retalking/resolve/main/30_net_gen.pth -d $HOME/app/checkpoints -o 30_net_gen.pth
|
|
|
61 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/video-retalking/resolve/main/shape_predictor_68_face_landmarks.dat -d $HOME/app/checkpoints -o shape_predictor_68_face_landmarks.dat
|
62 |
RUN unzip -d $HOME/app/checkpoints/BFM $HOME/app/checkpoints/BFM.zip
|
63 |
|
|
|
64 |
# Ensure the compiled CUDA code can be found
|
65 |
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
66 |
|
|
|
72 |
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
73 |
ENV CUDA_VISIBLE_DEVICES=0
|
74 |
|
75 |
+
# Run your Flask app with Gunicorn, setting the timeout to 1200 seconds (20 minutes)
|
76 |
+
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--timeout", "1200", "app:app"]
|