Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +27 -61
Dockerfile
CHANGED
@@ -2,10 +2,10 @@ FROM ubuntu:latest
|
|
2 |
|
3 |
WORKDIR /content
|
4 |
|
5 |
-
# Install system dependencies
|
6 |
RUN apt-get update && apt-get install -y \
|
7 |
python3 \
|
8 |
python3-pip \
|
|
|
9 |
gnupg \
|
10 |
wget \
|
11 |
htop \
|
@@ -23,89 +23,55 @@ RUN apt-get update && apt-get install -y \
|
|
23 |
libgtk2.0-0 \
|
24 |
jq \
|
25 |
libraw1394-dev \
|
26 |
-
libopenblas-dev
|
27 |
-
# Add these dependencies for dlib
|
28 |
-
libx11-dev \
|
29 |
-
libatlas-base-dev
|
30 |
|
31 |
-
|
32 |
-
RUN alias python=python3
|
33 |
|
34 |
-
|
35 |
-
RUN apt-get install -y ffmpeg
|
36 |
RUN apt-add-repository -y universe
|
37 |
|
38 |
-
|
39 |
-
RUN
|
40 |
-
cd dlib && \
|
41 |
-
mkdir build && \
|
42 |
-
cd build && \
|
43 |
-
cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1 && \
|
44 |
-
cmake --build . && \
|
45 |
-
cd .. && \
|
46 |
-
DLIB_USE_CUDA=0 USE_AVX_INSTRUCTIONS=1 python3 setup.py install
|
47 |
|
48 |
-
|
49 |
-
RUN pip install
|
50 |
-
RUN pip3 install numpy==1.26.4 --break-system-packages
|
51 |
-
RUN pip3 install pandas scipy matplotlib torch torchvision ffmpeg-python imageio[ffmpeg] \
|
52 |
-
tensorboardX huggingface-hub g2p_en opencv-python fairseq imageio torchaudio gradio \
|
53 |
-
gtts soundfile fairseq huggingface-hub g2p_en altair imageio-ffmpeg pocketsphinx \
|
54 |
-
ffmpeg jq --break-system-packages
|
55 |
-
RUN pip install cmake==3.24.1.1 --break-system-packages
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
RUN
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
66 |
|
67 |
-
|
68 |
-
COPY degradations.py /usr/local/lib/python3.12/dist-packages/basicsr/data/degradations.py
|
69 |
|
70 |
-
# Install PyVideoFramesExtractor
|
71 |
-
RUN git clone https://github.com/chi0tzp/PyVideoFramesExtractor && \
|
72 |
-
cd PyVideoFramesExtractor && \
|
73 |
-
pip install -r requirements.txt --break-system-packages
|
74 |
-
|
75 |
-
# Install Git LFS and Pocketsphinx
|
76 |
RUN git lfs install
|
77 |
-
RUN git clone https://huggingface.co/camenduru/pocketsphinx-20.04-t4 pocketsphinx &&
|
78 |
-
|
79 |
-
cmake -S . -B build && \
|
80 |
-
cmake --build build --target install
|
81 |
-
|
82 |
-
# Install One-Shot Talking Face
|
83 |
-
RUN git clone https://huggingface.co/camenduru/one-shot-talking-face-20.04-t4 one-shot-talking-face && \
|
84 |
-
cd one-shot-talking-face && \
|
85 |
-
pip install -r requirements.txt --break-system-packages && \
|
86 |
-
chmod 755 OpenFace/FeatureExtraction
|
87 |
-
|
88 |
-
# Copy utility file and modify scripts
|
89 |
-
COPY util.py /content/one-shot-talking-face/models/util.py
|
90 |
RUN sed -i 's/.cuda()/ /' one-shot-talking-face/test_script.py
|
91 |
RUN sed -i 's/.cuda()/ /' one-shot-talking-face/tools/interface.py
|
92 |
RUN sed -i 's/.load(checkpoint_path)/.load(checkpoint_path,map_location=torch.device("cpu")) /' one-shot-talking-face/tools/interface.py
|
93 |
RUN sed -i 's/.load(audio2pose)/.load(audio2pose,map_location=torch.device("cpu")) /' one-shot-talking-face/tools/interface.py
|
94 |
-
|
95 |
-
# Setup output directory
|
96 |
RUN mkdir /content/out
|
|
|
97 |
COPY app.py /content/app.py
|
98 |
|
99 |
-
|
100 |
RUN adduser --disabled-password --gecos '' admin
|
101 |
RUN adduser admin sudo
|
102 |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
103 |
RUN chown -R admin:admin /content
|
104 |
RUN chmod -R 777 /content
|
105 |
RUN chown -R admin:admin /home
|
106 |
RUN chmod -R 777 /home
|
107 |
-
|
108 |
USER admin
|
|
|
109 |
EXPOSE 7860
|
110 |
|
111 |
-
CMD ["
|
|
|
2 |
|
3 |
WORKDIR /content
|
4 |
|
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
python3 \
|
7 |
python3-pip \
|
8 |
+
python3-venv \
|
9 |
gnupg \
|
10 |
wget \
|
11 |
htop \
|
|
|
23 |
libgtk2.0-0 \
|
24 |
jq \
|
25 |
libraw1394-dev \
|
26 |
+
libopenblas-dev
|
|
|
|
|
|
|
27 |
|
28 |
+
RUN alias python=python3
|
|
|
29 |
|
30 |
+
RUN apt-get install -y gnupg wget htop sudo git git-lfs software-properties-common build-essential cmake curl
|
31 |
+
RUN apt-get install -y ffmpeg libavcodec-dev libavformat-dev libavdevice-dev libgl1 libgtk2.0-0 jq libraw1394-dev libopenblas-dev
|
32 |
RUN apt-add-repository -y universe
|
33 |
|
34 |
+
RUN python3 -m venv /content/venv
|
35 |
+
RUN /content/venv/bin/pip install --upgrade pip
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
RUN /content/venv/bin/pip install git+https://github.com/One-sixth/fairseq.git
|
38 |
+
RUN /content/venv/bin/pip install setuptools pandas scipy matplotlib torch torchvision ffmpeg-python imageio[ffmpeg] tensorboardX huggingface-hub g2p_en opencv-python imageio torchaudio gradio gtts soundfile fairseq huggingface-hub g2p_en altair imageio-ffmpeg pocketsphinx dlib ffmpeg jq
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
RUN /content/venv/bin/pip install numpy
|
41 |
+
RUN /content/venv/bin/pip install cmake==3.24.1.1
|
42 |
+
RUN /content/venv/bin/pip install gfpgan
|
43 |
+
# RUN git clone https://github.com/TencentARC/GFPGAN.git && \
|
44 |
+
# cd GFPGAN && \
|
45 |
+
# /content/venv/bin/pip install basicsr && \
|
46 |
+
# /content/venv/bin/pip install facexlib && \
|
47 |
+
# /content/venv/bin/pip install -r requirements.txt && \
|
48 |
+
# python3 setup.py develop && \
|
49 |
+
# /content/venv/bin/pip install realesrgan
|
50 |
|
51 |
+
RUN git clone https://github.com/chi0tzp/PyVideoFramesExtractor && cd PyVideoFramesExtractor && /content/venv/bin/pip install -r requirements.txt
|
|
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
RUN git lfs install
|
54 |
+
RUN git clone https://huggingface.co/camenduru/pocketsphinx-20.04-t4 pocketsphinx && cd pocketsphinx && cmake -S . -B build && cmake --build build --target install
|
55 |
+
RUN git clone https://huggingface.co/camenduru/one-shot-talking-face-20.04-t4 one-shot-talking-face && cd one-shot-talking-face && /content/venv/bin/pip install -r requirements.txt && chmod 755 OpenFace/FeatureExtraction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
RUN sed -i 's/.cuda()/ /' one-shot-talking-face/test_script.py
|
57 |
RUN sed -i 's/.cuda()/ /' one-shot-talking-face/tools/interface.py
|
58 |
RUN sed -i 's/.load(checkpoint_path)/.load(checkpoint_path,map_location=torch.device("cpu")) /' one-shot-talking-face/tools/interface.py
|
59 |
RUN sed -i 's/.load(audio2pose)/.load(audio2pose,map_location=torch.device("cpu")) /' one-shot-talking-face/tools/interface.py
|
|
|
|
|
60 |
RUN mkdir /content/out
|
61 |
+
|
62 |
COPY app.py /content/app.py
|
63 |
|
64 |
+
|
65 |
RUN adduser --disabled-password --gecos '' admin
|
66 |
RUN adduser admin sudo
|
67 |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
68 |
+
|
69 |
RUN chown -R admin:admin /content
|
70 |
RUN chmod -R 777 /content
|
71 |
RUN chown -R admin:admin /home
|
72 |
RUN chmod -R 777 /home
|
|
|
73 |
USER admin
|
74 |
+
|
75 |
EXPOSE 7860
|
76 |
|
77 |
+
CMD ["/content/venv/bin/python", "app.py"]
|