jmanhype
commited on
Commit
Β·
17e5bab
1
Parent(s):
0fdeb58
Refactor Dockerfile with proper dependency order and MMCM handling
Browse files- scripts/gradio/Dockerfile +59 -9
scripts/gradio/Dockerfile
CHANGED
@@ -36,16 +36,64 @@ RUN conda create -n musev python=3.10 -y && \
|
|
36 |
# Install setuptools first
|
37 |
RUN conda run -n musev pip install --no-cache-dir setuptools==65.5.1
|
38 |
|
39 |
-
# Install dependencies
|
40 |
-
RUN conda run -n musev pip install --no-cache-dir
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
-
# Install
|
46 |
-
RUN conda run -n musev pip install --no-cache-dir git+https://github.com/TMElyralab/
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
# Copy and set up entrypoint
|
51 |
COPY scripts/gradio/entrypoint.sh /entrypoint.sh
|
@@ -54,4 +102,6 @@ RUN chmod +x /entrypoint.sh
|
|
54 |
# Switch to non-root user
|
55 |
USER user
|
56 |
|
|
|
|
|
57 |
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
36 |
# Install setuptools first
|
37 |
RUN conda run -n musev pip install --no-cache-dir setuptools==65.5.1
|
38 |
|
39 |
+
# Install core dependencies first
|
40 |
+
RUN conda run -n musev pip install --no-cache-dir \
|
41 |
+
torch \
|
42 |
+
torchvision \
|
43 |
+
torchaudio \
|
44 |
+
transformers==4.33.1 \
|
45 |
+
accelerate==0.22.0 \
|
46 |
+
gradio>=4.0.0 \
|
47 |
+
spaces \
|
48 |
+
ninja==1.11.1 \
|
49 |
+
bitsandbytes==0.41.1 \
|
50 |
+
xformers==0.0.21 \
|
51 |
+
omegaconf \
|
52 |
+
einops \
|
53 |
+
imageio==2.31.1 \
|
54 |
+
pandas \
|
55 |
+
matplotlib \
|
56 |
+
pynvml==11.5.0 \
|
57 |
+
moviepy==1.0.3 \
|
58 |
+
scikit-learn \
|
59 |
+
librosa==0.10.1 \
|
60 |
+
ffmpeg-python \
|
61 |
+
easydict \
|
62 |
+
mediapipe==0.10.3 \
|
63 |
+
insightface==0.7.3 \
|
64 |
+
opencv-python \
|
65 |
+
Pillow \
|
66 |
+
protobuf==3.20.3 \
|
67 |
+
PyYAML \
|
68 |
+
scipy \
|
69 |
+
tqdm \
|
70 |
+
albumentations==1.3.1 \
|
71 |
+
opencv-contrib-python==4.8.0.76 \
|
72 |
+
imageio-ffmpeg==0.4.8 \
|
73 |
+
pytorch-lightning==2.0.8 \
|
74 |
+
timm==0.9.12 \
|
75 |
+
safetensors==0.3.3 \
|
76 |
+
pycocotools \
|
77 |
+
kornia==0.7.0 \
|
78 |
+
open_clip_torch==2.20.0 \
|
79 |
+
torchmetrics==1.1.1 \
|
80 |
+
invisible-watermark==0.1.5 \
|
81 |
+
ftfy==6.1.1 \
|
82 |
+
loguru==0.6.0 \
|
83 |
+
markupsafe==2.0.1 \
|
84 |
+
cuid
|
85 |
|
86 |
+
# Install git dependencies incrementally
|
87 |
+
RUN conda run -n musev pip install --no-cache-dir git+https://github.com/TMElyralab/diffusers.git@tme
|
88 |
+
RUN conda run -n musev pip install --no-cache-dir git+https://github.com/tencent-ailab/IP-Adapter.git@main
|
89 |
+
RUN conda run -n musev pip install --no-cache-dir git+https://github.com/openai/CLIP.git@main
|
90 |
+
RUN conda run -n musev pip install --no-cache-dir git+https://github.com/TMElyralab/controlnet_aux.git@tme
|
91 |
+
|
92 |
+
# Clone MMCM separately and install from local
|
93 |
+
RUN git clone https://github.com/TMElyralab/MMCM.git /tmp/mmcm && \
|
94 |
+
cd /tmp/mmcm && \
|
95 |
+
git checkout setup && \
|
96 |
+
conda run -n musev pip install -e .
|
97 |
|
98 |
# Copy and set up entrypoint
|
99 |
COPY scripts/gradio/entrypoint.sh /entrypoint.sh
|
|
|
102 |
# Switch to non-root user
|
103 |
USER user
|
104 |
|
105 |
+
EXPOSE 7860
|
106 |
+
|
107 |
ENTRYPOINT ["/entrypoint.sh"]
|