Spaces:
Build error
Build error
FROM ubuntu:latest | |
WORKDIR /content | |
RUN apt-get update && apt-get install -y \ | |
python3 \ | |
python3-pip \ | |
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 pip install git+https://github.com/One-sixth/fairseq.git --break-system-packages | |
RUN pip3 install pandas scipy matplotlib torch torchvision ffmpeg-python imageio[ffmpeg] tensorboardX huggingface-hub g2p_en opencv-python fairseq imageio torchaudio gradio gtts soundfile fairseq huggingface-hub g2p_en altair imageio-ffmpeg pocketsphinx dlib ffmpeg jq numpy --break-system-packages | |
RUN pip install cmake==3.24.1.1 --break-system-packages | |
RUN git clone https://github.com/TencentARC/GFPGAN.git && cd GFPGAN && pip install basicsr --break-system-packages && pip install facexlib --break-system-packages && pip install -r requirements.txt --break-system-packages && python3 setup.py develop && pip install realesrgan --break-system-packages | |
COPY degradations.py /usr/local/lib/python3.12/dist-packages/basicsr/data/degradations.py | |
RUN git clone https://github.com/chi0tzp/PyVideoFramesExtractor && cd PyVideoFramesExtractor && pip install -r requirements.txt --break-system-packages | |
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 && pip install -r requirements.txt --break-system-packages && 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 ["python3", "app.py"] |