Spaces:
Runtime error
Runtime error
updated
Browse files- Dockerfile +20 -9
Dockerfile
CHANGED
@@ -2,6 +2,7 @@
|
|
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
|
@@ -10,13 +11,15 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|
10 |
# Install Git, OpenGL libraries, and libglib2.0
|
11 |
RUN apt-get update && apt-get install -y git libgl1-mesa-glx libglib2.0-0
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
15 |
|
16 |
# Set up a new user named "user" with user ID 1000
|
17 |
RUN useradd -m -u 1000 user
|
18 |
|
19 |
-
# Switch to the "user"
|
20 |
USER user
|
21 |
|
22 |
# Set environment variables
|
@@ -32,9 +35,7 @@ ENV HOME=/home/user \
|
|
32 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
33 |
GRADIO_THEME=huggingface \
|
34 |
GRADIO_SHARE=True \
|
35 |
-
SYSTEM=spaces
|
36 |
-
CUDA_DEVICE_ORDER=PCI_BUS_ID \
|
37 |
-
CUDA_VISIBLE_DEVICES=0
|
38 |
|
39 |
# Set the working directory to the user's home directory
|
40 |
WORKDIR $HOME/app
|
@@ -45,8 +46,9 @@ RUN git clone -b main https://github.com/ashpexx/make-vid-talk $HOME/app
|
|
45 |
# Install specific versions of PyTorch and TorchVision
|
46 |
RUN pip install torch==2.0.0+cu117 torchvision==0.15.0+cu117 -f https://download.pytorch.org/whl/torch_stable.html
|
47 |
|
48 |
-
# Install dependencies
|
49 |
-
|
|
|
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,8 +65,17 @@ 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 |
# Ensure the compiled CUDA code can be found
|
67 |
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
68 |
|
69 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
CMD ["python", "app.py"]
|
|
|
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
|
|
|
11 |
# Install Git, OpenGL libraries, and libglib2.0
|
12 |
RUN apt-get update && apt-get install -y git libgl1-mesa-glx libglib2.0-0
|
13 |
|
14 |
+
RUN apt-get update && apt-get install -y ninja-build
|
15 |
+
|
16 |
+
# Install necessary dependencies, including CMake, a C++ compiler, and others
|
17 |
+
RUN apt-get update && apt-get install -y unzip ffmpeg cmake g++ build-essential aria2
|
18 |
|
19 |
# Set up a new user named "user" with user ID 1000
|
20 |
RUN useradd -m -u 1000 user
|
21 |
|
22 |
+
# Switch to the "user" user
|
23 |
USER user
|
24 |
|
25 |
# Set environment variables
|
|
|
35 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
36 |
GRADIO_THEME=huggingface \
|
37 |
GRADIO_SHARE=True \
|
38 |
+
SYSTEM=spaces
|
|
|
|
|
39 |
|
40 |
# Set the working directory to the user's home directory
|
41 |
WORKDIR $HOME/app
|
|
|
46 |
# Install specific versions of PyTorch and TorchVision
|
47 |
RUN pip install torch==2.0.0+cu117 torchvision==0.15.0+cu117 -f https://download.pytorch.org/whl/torch_stable.html
|
48 |
|
49 |
+
# Install dependencies
|
50 |
+
#COPY requirements.txt $HOME/app/requirements.txt
|
51 |
+
RUN pip install --no-cache-dir -r requirements.txt gradio==4.36.1 moviepy
|
52 |
|
53 |
# Download checkpoint files using aria2
|
54 |
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
|
|
|
65 |
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
|
66 |
RUN unzip -d $HOME/app/checkpoints/BFM $HOME/app/checkpoints/BFM.zip
|
67 |
|
68 |
+
|
69 |
# Ensure the compiled CUDA code can be found
|
70 |
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
71 |
|
72 |
+
# Update package lists and install other dependencies as needed
|
73 |
+
# Ensure that CUDA components are correctly installed and configured
|
74 |
+
# Install any other required packages
|
75 |
+
|
76 |
+
# Set the environment variable to specify the GPU device
|
77 |
+
ENV CUDA_DEVICE_ORDER=PCI_BUS_ID
|
78 |
+
ENV CUDA_VISIBLE_DEVICES=0
|
79 |
+
|
80 |
+
# Run your app.py script
|
81 |
CMD ["python", "app.py"]
|