aloatist commited on
Commit
be81ae2
·
verified ·
1 Parent(s): 6e6c2d9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -169
Dockerfile CHANGED
@@ -29,185 +29,24 @@ RUN curl https://pyenv.run | bash
29
  ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
30
 
31
  ARG PYTHON_VERSION=3.9.17
32
- # Python
33
  RUN pyenv install $PYTHON_VERSION && \
34
  pyenv global $PYTHON_VERSION && \
35
  pyenv rehash && \
36
- #pip install --no-cache-dir --upgrade pip setuptools wheel && \
37
- # pip install --no-cache-dir \
38
- # ... (giữ nguyên phần trên của Dockerfile)
39
 
40
- # Cài đặt requirements với nguồn PyTorch bổ sung
41
- RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
42
- pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu118 -r /code/requirements.txt
43
-
44
- # ... (giữ nguyên phần dưới)
45
- datasets \
46
- huggingface-hub "protobuf<4" "click<8.1"
47
- #pip install huggingface_hub["cli"] && \
48
- #huggingface-cli delete-cache
49
-
50
-
51
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
52
-
53
- # Set the working directory to /data if USE_PERSISTENT_DATA is set, otherwise set to $HOME/app
54
  WORKDIR $HOME/app
55
 
56
- # Clone the ComfyUI repo (fork with restart button)
57
  RUN git clone https://github.com/comfyanonymous/ComfyUI.git . && \
58
- pip install --no-cache-dir -r requirements.txt
59
-
60
- # ... (giữ nguyên phần đầu của Dockerfile)
61
 
62
- # WAN 2.1 I2V-14B-720P
63
  RUN wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/wan2.1_i2v_720p_14B_fp8_e4m3fn.safetensors -P ./models/diffusion_models/ && \
64
  wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/wan_2.1_vae.safetensors -P ./models/vae/ && \
65
  wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/umt5_xxl_fp8_e4m3fn_scaled.safetensors -P ./models/text_encoders/ && \
66
  wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/clip_vision_h.safetensors -P ./models/clip_vision/
67
 
68
- # ... (giữ nguyên phần còn lại)
69
-
70
- # Checkpoints
71
- RUN echo "Downloading checkpoints..." && \
72
- # Kybalico Models
73
- #wget -c https://huggingface.co/Kybalico/CandyApple/resolve/main/candyApple_v12.safetensors -P ./models/checkpoints/ && \
74
- #wget -c https://huggingface.co/Kybalico/CalicoMix/resolve/main/calicoMix_v75.safetensors -P ./models/checkpoints/ && \
75
- #wget -c https://huggingface.co/Kybalico/CalicoMixDC/resolve/main/calicomix_dcV30.safetensors -P ./models/checkpoints/ && \
76
- #wget -c https://huggingface.co/Kybalico/AnmitsuMimimi/resolve/main/anmitsuMimimi_v10.safetensors -P ./models/checkpoints/ && \
77
-
78
- # SD1.5
79
- #wget -c https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt -P ./models/checkpoints/ && \
80
- #wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors -P ./models/checkpoints/ && \
81
- #wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors -P ./models/checkpoints/ && \
82
-
83
- # SD2
84
- #wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.safetensors -P ./models/checkpoints/ && \
85
- #wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors -P ./models/checkpoints/ && \
86
-
87
- # Some SD1.5 anime style
88
- #wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_hard.safetensors -P ./models/checkpoints/ && \
89
- #wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A1_orangemixs.safetensors -P ./models/checkpoints/ && \
90
- #wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A3_orangemixs.safetensors -P ./models/checkpoints/ && \
91
- #wget -c https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp16-pruned.safetensors -P ./models/checkpoints/ && \
92
-
93
- # Waifu Diffusion 1.5 (anime style SD2.x 768-v)
94
- #wget -c https://huggingface.co/waifu-diffusion/wd-1-5-beta2/resolve/main/checkpoints/wd-1-5-beta2-fp16.safetensors -P ./models/checkpoints/ && \
95
-
96
-
97
- # unCLIP models
98
- #wget -c https://huggingface.co/comfyanonymous/illuminatiDiffusionV1_v11_unCLIP/resolve/main/illuminatiDiffusionV1_v11-unclip-h-fp16.safetensors -P ./models/checkpoints/ && \
99
- #wget -c https://huggingface.co/comfyanonymous/wd-1.5-beta2_unCLIP/resolve/main/wd-1-5-beta2-aesthetic-unclip-h-fp16.safetensors -P ./models/checkpoints/ && \
100
-
101
- # TechnoByte Models
102
- #wget -c https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v20.safetensors -P ./models/checkpoints/ && \
103
-
104
- # VAE
105
- #wget -c https://huggingface.co/RedRayz/MyVAE/resolve/main/CleanVAE.safetensors -P ./models/vae/ && \
106
- # wget -c https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/ && \
107
- #wget -c https://huggingface.co/tuwonga/marblesh/resolve/main/marblesh.safetensors -P ./models/vae/ && \
108
- #wget -c https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/blob/main/LCM_Dreamshaper_v7_4k.safetensors -P ./models/vae/ && \
109
-
110
- # ControlNet
111
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors -P ./models/controlnet/ && \
112
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors -P ./models/controlnet/ && \
113
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_canny_fp16.safetensors -P ./models/controlnet/ && \
114
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors -P ./models/controlnet/ && \
115
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors -P ./models/controlnet/ && \
116
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_lineart_fp16.safetensors -P ./models/controlnet/ && \
117
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors -P ./models/controlnet/ && \
118
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors -P ./models/controlnet/ && \
119
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_openpose_fp16.safetensors -P ./models/controlnet/ && \
120
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_scribble_fp16.safetensors -P ./models/controlnet/ && \
121
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_seg_fp16.safetensors -P ./models/controlnet/ && \
122
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_softedge_fp16.safetensors -P ./models/controlnet/ && \
123
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors -P ./models/controlnet/ && \
124
- # wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11u_sd15_tile_fp16.safetensors -P ./models/controlnet/ && \
125
-
126
- # # GLIGEN
127
- # wget -c https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors/resolve/main/gligen_sd14_textbox_pruned_fp16.safetensors -P ./models/gligen/ && \
128
-
129
- # # ESRGAN upscale model
130
- # wget -c https://huggingface.co/konohashinobi4/4xAnimesharp/resolve/main/4x-AnimeSharp.pth -P ./models/upscale_models/ && \
131
- # wget -c https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P ./models/upscale_models/ && \
132
- # wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth -P ./models/upscale_models/ && \
133
- # wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth -P ./models/upscale_models/ && \
134
-
135
- # motion_lora
136
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanLeft.ckpt -P ./models/motion_lora/ && \
137
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanRight.ckpt -P ./models/motion_lora/ && \
138
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingAnticlockwise.ckpt -P ./models/motion_lora/ && \
139
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingClockwise.ckpt -P ./models/motion_lora/ && \
140
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltDown.ckpt -P ./models/motion_lora/ && \
141
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltUp.ckpt -P ./models/motion_lora/ && \
142
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomIn.ckpt -P ./models/motion_lora/ && \
143
- # wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomOut.ckpt -P ./models/motion_lora/ && \
144
-
145
-
146
- # loras
147
- #wget -c https://huggingface.co/stabilityai/control-lora/blob/main/control-LoRAs-rank256/control-lora-canny-rank256.safetensors -P ./models/loras/ && \
148
-
149
- # # Aesthetic scorer models
150
- # mkdir ./models/aesthetic && \
151
- # wget -c https://github.com/grexzen/SD-Chad/raw/main/chadscorer.pth -P ./models/aesthetic/ && \
152
- # wget -c https://github.com/christophschuhmann/improved-aesthetic-predictor/raw/main/ava+logos-l14-linearMSE.pth -P ./models/aesthetic/
153
-
154
- echo "Installing custom nodes..."
155
-
156
- # ComfyUI Manager
157
- RUN cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \
158
-
159
-
160
- #git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite && \
161
- # git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git && \
162
- #git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes && \
163
- # git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive && \
164
- # git clone https://github.com/BlenderNeko/ComfyUI_TiledKSampler.git && \
165
- # git clone https://github.com/BlenderNeko/ComfyUI_SeeCoder.git && \
166
- # git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git && \
167
-
168
-
169
- # Install custom nodes
170
- echo "Installing custom nodes..."
171
-
172
- # Controlnet Preprocessor nodes by Fannovel16
173
- # RUN git clone https://github.com/Wan-Video/Wan2.1.git && cd cd Wan2.1 && pip install -r requirements.txt
174
- # RUN cd custom_nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux && cd comfyui_controlnet_aux && pip install -r requirements.txt
175
- #RUN cd custom_nodes && git clone https://github.com/Stability-AI/stability-ComfyUI-nodes && cd stability-ComfyUI-nodes && pip install -r requirements.txt
176
-
177
- # RUN cd custom_nodes && git clone https://github.com/EllangoK/ComfyUI-post-processing-nodes --depth 1
178
- # RUN cd custom_nodes && git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes --depth 1
179
- # RUN cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack --depth 1 && cd ComfyUI-Impact-Pack && python install.py
180
- # RUN cd custom_nodes && git clone https://github.com/TechnoByteJS/comfy-aesthetic-nodes --depth 1 && cd comfy-aesthetic-nodes && pip install -r requirements.txt
181
-
182
- #RUN cd custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui.git --depth 1 && cd was-node-suite-comfyui && pip install -r requirements.txt
183
-
184
- # RUN cd custom_nodes && git clone https://github.com/0xbitches/ComfyUI-LCM.git --depth 1
185
- # RUN cd custom_nodes && echo "#Plz don't delete this file, just edit it when neccessary." > ComfyUI-LCM/config.yaml
186
- # RUN cd custom_nodes && echo 'ckpts_path: "./ckpts"' >> ComfyUI-LCM/config.yaml
187
- # RUN cd custom_nodes && echo 'ops_backend: "taichi" #Either "taichi" or "cupy"' >> ComfyUI-LCM/config.yaml
188
- # RUN cd custom_nodes && cd ComfyUI-LCM/ && pip install -r requirements.txt
189
-
190
- #RUN cd custom_nodes && git clone https://github.com/WASasquatch/PowerNoiseSuite.git
191
- # RUN cd custom_nodes && git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui.git && cd ymc-node-suite-comfyui && pip install -r requirements.txt
192
-
193
- # RUN cd custom_nodes && git clone https://github.com/Fannovel16/ComfyUI-Frame-Interpolation.git --depth 1 && cd ComfyUI-Frame-Interpolation && python install.py
194
-
195
- #RUN cd custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved
196
-
197
- #RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15_v2.ckpt -P ./ComfyUI-AnimateDiff-Evolved/models/
198
- #RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15.ckpt -P ./ComfyUI-AnimateDiff-Evolved/models/
199
-
200
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanLeft.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
201
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanRight.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
202
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingAnticlockwise.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
203
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingClockwise.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
204
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltDown.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
205
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltUp.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
206
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomIn.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
207
- # RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomOut.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/
208
-
209
- RUN echo "Done"
210
-
211
- CMD ["python", "main.py", "--listen", "0.0.0.0", "--cpu", "--port", "7860", "--use-split-cross-attention", "--output-directory", "${USE_PERSISTENT_DATA:+/data/}"]
212
-
213
-
 
29
  ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
30
 
31
  ARG PYTHON_VERSION=3.9.17
32
+ # Python và các thư viện
33
  RUN pyenv install $PYTHON_VERSION && \
34
  pyenv global $PYTHON_VERSION && \
35
  pyenv rehash && \
36
+ pip install --no-cache-dir --upgrade pip setuptools wheel && \
37
+ pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu118 -r /code/requirements.txt && \
38
+ pip install --no-cache-dir datasets huggingface-hub "protobuf<4" "click<8.1"
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  WORKDIR $HOME/app
41
 
42
+ # Clone ComfyUI cài đặt
43
  RUN git clone https://github.com/comfyanonymous/ComfyUI.git . && \
44
+ pip install --no-cache-dir -r requirements.txt
 
 
45
 
46
+ # Tải WAN 2.1 I2V-14B-720P
47
  RUN wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/wan2.1_i2v_720p_14B_fp8_e4m3fn.safetensors -P ./models/diffusion_models/ && \
48
  wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/wan_2.1_vae.safetensors -P ./models/vae/ && \
49
  wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/umt5_xxl_fp8_e4m3fn_scaled.safetensors -P ./models/text_encoders/ && \
50
  wget -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/clip_vision_h.safetensors -P ./models/clip_vision/
51
 
52
+ CMD ["python", "main.py", "--listen", "0.0.0.0", "--cpu", "--port", "7860", "--use-split-cross-attention", "--output-directory", "${USE_PERSISTENT_DATA:+/data/}"]