Spaces:
Build error
Build error
File size: 3,245 Bytes
53018a6 d014082 d12277b f901e07 d014082 00a3c5c d014082 1391011 f901e07 00a3c5c 77e775a 1391011 d014082 7ff4661 f23bd0b d014082 1391011 d014082 1391011 f23bd0b 1391011 f23bd0b 1391011 d014082 77e775a 00a3c5c d014082 f901e07 1391011 d014082 00a3c5c d014082 77e775a 00a3c5c f901e07 d014082 00a3c5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
FROM ubuntu:latest
WORKDIR /content
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
gnupg \
wget \
htop \
sudo \
git \
git-lfs \
software-properties-common \
build-essential \
cmake \
curl \
libavcodec-dev \
libavformat-dev \
libavdevice-dev \
libgl1 \
libgtk2.0-0 \
jq \
libraw1394-dev \
libopenblas-dev
RUN alias python=python3
RUN apt-get install -y gnupg wget htop sudo git git-lfs software-properties-common build-essential cmake curl
RUN apt-get install -y ffmpeg libavcodec-dev libavformat-dev libavdevice-dev libgl1 libgtk2.0-0 jq libraw1394-dev libopenblas-dev
RUN apt-add-repository -y universe
RUN python3 -m venv /content/venv
RUN /content/venv/bin/pip install git+https://github.com/One-sixth/fairseq.git
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 ffmpeg jq
# 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 ffmpeg jq nltk
RUN /content/venv/bin/pip install numpy==2.2.0
RUN /content/venv/bin/pip install cmake==3.24.1.1
RUN /content/venv/bin/pip install gfpgan
RUN /content/venv/bin/pip install mediapipe
# RUN git clone https://github.com/TencentARC/GFPGAN.git && \
# cd GFPGAN && \
# /content/venv/bin/pip install basicsr && \
# /content/venv/bin/pip install facexlib && \
# /content/venv/bin/pip install -r requirements.txt && \
# python3 setup.py develop && \
# /content/venv/bin/pip install realesrgan
RUN git clone https://github.com/chi0tzp/PyVideoFramesExtractor && cd PyVideoFramesExtractor && /content/venv/bin/pip install -r requirements.txt
RUN git lfs install
RUN git clone https://huggingface.co/camenduru/pocketsphinx-20.04-t4 pocketsphinx && cd pocketsphinx && cmake -S . -B build && cmake --build build --target install
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
RUN sed -i 's/.cuda()/ /' one-shot-talking-face/test_script.py
RUN sed -i 's/.cuda()/ /' one-shot-talking-face/tools/interface.py
RUN sed -i 's/.load(checkpoint_path)/.load(checkpoint_path,map_location=torch.device("cpu")) /' one-shot-talking-face/tools/interface.py
RUN sed -i 's/.load(audio2pose)/.load(audio2pose,map_location=torch.device("cpu")) /' one-shot-talking-face/tools/interface.py
RUN mkdir /content/out
COPY app.py /content/app.py
RUN adduser --disabled-password --gecos '' admin
RUN adduser admin sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN chown -R admin:admin /content
RUN chmod -R 777 /content
RUN chown -R admin:admin /home
RUN chmod -R 777 /home
USER admin
EXPOSE 7860
CMD ["/content/venv/bin/python", "app.py"] |