jmanhype commited on
Commit
e8a2b7c
Β·
1 Parent(s): 6ec0d8b

fix: Update Dockerfile to handle dependencies incrementally

Browse files
Files changed (1) hide show
  1. Dockerfile +68 -4
Dockerfile CHANGED
@@ -51,8 +51,72 @@ RUN conda create -n musev python=3.10 -y && \
51
  # Install setuptools first with a specific version
52
  RUN conda run -n musev pip install --no-cache-dir setuptools==65.5.1
53
 
54
- # Install Python packages from requirements.txt
55
- RUN conda run -n musev pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  # Create entrypoint script
58
  RUN printf '#!/bin/bash\n\
@@ -61,7 +125,7 @@ whoami\n\
61
  which python\n\
62
  \n\
63
  # Set up Python path\n\
64
- export PYTHONPATH=${PYTHONPATH}:/home/user/app/MuseV:/home/user/app/MuseV/MMCM:/home/user/app/MuseV/diffusers/src:/home/user/app/MuseV/controlnet_aux/src\n\
65
  echo "pythonpath" $PYTHONPATH\n\
66
  \n\
67
  # Activate conda environment\n\
@@ -73,7 +137,7 @@ which python\n\
73
  python --version\n\
74
  \n\
75
  # Run the app\n\
76
- python app_gradio_space.py\n' > $HOME/app/scripts/gradio/entrypoint.sh
77
 
78
  # Make the script executable
79
  RUN chmod +x $HOME/app/scripts/gradio/entrypoint.sh && \
 
51
  # Install setuptools first with a specific version
52
  RUN conda run -n musev pip install --no-cache-dir setuptools==65.5.1
53
 
54
+ # Install core dependencies first
55
+ RUN conda run -n musev pip install --no-cache-dir \
56
+ torch \
57
+ torchvision \
58
+ torchaudio \
59
+ transformers==4.33.1 \
60
+ accelerate==0.22.0 \
61
+ gradio>=4.0.0 \
62
+ spaces \
63
+ ninja==1.11.1 \
64
+ bitsandbytes==0.41.1 \
65
+ xformers==0.0.21 \
66
+ omegaconf \
67
+ einops \
68
+ imageio==2.31.1 \
69
+ pandas \
70
+ matplotlib \
71
+ pynvml==11.5.0 \
72
+ moviepy==1.0.3 \
73
+ scikit-learn \
74
+ librosa==0.10.1 \
75
+ ffmpeg-python \
76
+ easydict \
77
+ mediapipe==0.10.3 \
78
+ insightface==0.7.3 \
79
+ opencv-python \
80
+ Pillow \
81
+ protobuf==3.20.3 \
82
+ PyYAML \
83
+ scipy \
84
+ tqdm \
85
+ albumentations==1.3.1 \
86
+ opencv-contrib-python==4.8.0.76 \
87
+ imageio-ffmpeg==0.4.8 \
88
+ pytorch-lightning==2.0.8 \
89
+ timm==0.9.12 \
90
+ safetensors==0.3.3 \
91
+ pycocotools \
92
+ kornia==0.7.0 \
93
+ open_clip_torch==2.20.0 \
94
+ torchmetrics==1.1.1 \
95
+ invisible-watermark==0.1.5 \
96
+ ftfy==6.1.1 \
97
+ loguru==0.6.0 \
98
+ markupsafe==2.0.1 \
99
+ cuid
100
+
101
+ # Install MMCM dependencies first
102
+ RUN conda run -n musev pip install --no-cache-dir basicsr && \
103
+ conda run -n musev pip install --no-cache-dir -U openmim && \
104
+ conda run -n musev mim install mmengine && \
105
+ conda run -n musev mim install "mmcv>=2.0.1" && \
106
+ conda run -n musev mim install "mmdet>=3.1.0" && \
107
+ conda run -n musev mim install "mmpose>=1.1.0"
108
+
109
+ # Install git dependencies incrementally
110
+ RUN conda run -n musev pip install --no-cache-dir git+https://github.com/TMElyralab/diffusers.git@tme
111
+ RUN conda run -n musev pip install --no-cache-dir git+https://github.com/tencent-ailab/IP-Adapter.git@main
112
+ RUN conda run -n musev pip install --no-cache-dir git+https://github.com/openai/CLIP.git@main
113
+ RUN conda run -n musev pip install --no-cache-dir git+https://github.com/TMElyralab/controlnet_aux.git@tme
114
+
115
+ # Now install MMCM after its dependencies are installed
116
+ RUN git clone https://github.com/TMElyralab/MMCM.git /tmp/mmcm && \
117
+ cd /tmp/mmcm && \
118
+ git checkout setup && \
119
+ conda run -n musev pip install -e .
120
 
121
  # Create entrypoint script
122
  RUN printf '#!/bin/bash\n\
 
125
  which python\n\
126
  \n\
127
  # Set up Python path\n\
128
+ export PYTHONPATH=${PYTHONPATH}:/home/user/app:/home/user/app/MMCM:/home/user/app/diffusers/src:/home/user/app/controlnet_aux/src\n\
129
  echo "pythonpath" $PYTHONPATH\n\
130
  \n\
131
  # Activate conda environment\n\
 
137
  python --version\n\
138
  \n\
139
  # Run the app\n\
140
+ python scripts/gradio/app_gradio_space.py\n' > $HOME/app/scripts/gradio/entrypoint.sh
141
 
142
  # Make the script executable
143
  RUN chmod +x $HOME/app/scripts/gradio/entrypoint.sh && \