File size: 1,386 Bytes
dc205e7
cdee5b8
dc205e7
 
533e17d
cdee5b8
 
 
533e17d
dc205e7
 
 
533e17d
dc205e7
 
 
533e17d
d92f381
54c7cbd
6be1ba3
54c7cbd
 
533e17d
 
728ead8
533e17d
 
83e82b7
533e17d
 
 
 
 
 
 
 
 
 
e93de90
533e17d
 
0cbbb23
533e17d
6571bfa
533e17d
dc205e7
b97ebe5
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
FROM anchorxia/musev:latest

LABEL MAINTAINER="zkangchen"
LABEL Email="zkangchen@tencent.com"
LABEL Description="MuseTalk Gradio image for Hugging Face Spaces"

SHELL ["/bin/bash", "--login", "-c"]

# Create a user and switch to it
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

# Clone MuseTalk repo
RUN git clone -b main --recursive https://github.com/TMElyralab/MuseTalk.git MuseTalkBase

RUN git clone https://huggingface.co/spaces/e-commint/MuseTal MuseTalk


# Set working directory to MuseTalk project
WORKDIR $HOME/app/MuseTalk

# Make all files executable
RUN chmod -R 777 .
RUN mv $HOME/app/MuseTalkBase/download_weights.sh $HOME/app/MuseTalk/
# Activate conda env and install dependencies
RUN . /opt/conda/etc/profile.d/conda.sh && \
    echo "source activate musev" >> ~/.bashrc && \
    conda activate musev && \
    pip install -r requirements.txt && \
    pip install --no-cache-dir -U openmim && \
    mim install mmengine && \
    mim install "mmcv>=2.0.1" && \
    mim install "mmdet>=3.1.0" && \
    mim install "mmpose>=1.1.0"

# Optional: Check ffmpeg availability
RUN ffmpeg -codecs || echo "FFmpeg check failed or not installed"

RUN chmod +x download_weights.sh && ./download_weights.sh

# Expose port for Gradio
EXPOSE 7860
CMD ["bash", "-c", "scripts/install_ffmpeg.sh && ./entrypoint.sh"]