download some custom nodes i usually need
This commit is contained in:
parent
5039d28022
commit
623ba5db99
@ -16,7 +16,9 @@ VOLUME [ \
|
||||
"/ComfyUI/models", \
|
||||
"/ComfyUI/input", \
|
||||
"/ComfyUI/output", \
|
||||
"/ComfyUI/custom_nodes" \
|
||||
"/ComfyUI/custom_nodes", \
|
||||
"/ComfyUI/my_workflows", \
|
||||
"/ComfyUI_temp" \
|
||||
]
|
||||
|
||||
RUN pip3 install --upgrade pip \
|
||||
@ -29,6 +31,9 @@ COPY ./cmd.sh /
|
||||
|
||||
RUN chmod +x /cmd.sh
|
||||
|
||||
COPY ./nodes_download.bash /
|
||||
|
||||
RUN bash /nodes_download.bash
|
||||
|
||||
RUN cp -TR "/ComfyUI/models" /tmp_models
|
||||
RUN cp -TR "/ComfyUI/input" /tmp_input
|
||||
|
@ -3,5 +3,6 @@
|
||||
Dockerfile for ComfyUI
|
||||
|
||||
No automatic downloads of terabytes of models, no manager, no custom nodes, no nothing. It's just comfy.
|
||||
(I lied, there are some custom nodes defined in nodes_download.bash, you can delete them if you wish so)
|
||||
|
||||
Only works on nvidia (container uses cuda 12.6.1), for the sake of simplicity and because i have no other gpus.
|
10
cmd.sh
10
cmd.sh
@ -5,4 +5,12 @@ cp -r --update /tmp_input/* /ComfyUI/input
|
||||
cp -r --update /tmp_output/* /ComfyUI/output
|
||||
cp -r --update /tmp_custom_nodes/* /ComfyUI/custom_nodes
|
||||
|
||||
python3 /ComfyUI/main.py --listen
|
||||
chown -R 1000:1000 /ComfyUI/models
|
||||
chown -R 1000:1000 /ComfyUI/input
|
||||
chown -R 1000:1000 /ComfyUI/output
|
||||
chown -R 1000:1000 /ComfyUI/custom_nodes
|
||||
chown -R 1000:1000 /ComfyUI/my_workflows
|
||||
chown -R 1000:1000 /ComfyUI_temp
|
||||
|
||||
|
||||
python3 /ComfyUI/main.py --listen --temp-directory /ComfyUI_temp
|
||||
|
0
comfyui.log
Normal file
0
comfyui.log
Normal file
@ -10,6 +10,9 @@ services:
|
||||
- ./custom_nodes/:/ComfyUI/custom_nodes/
|
||||
- ./output:/ComfyUI/output
|
||||
- ./input:/ComfyUI/input
|
||||
- ./my_workflows:/ComfyUI/my_workflows
|
||||
- ./ComfyUI_temp:/ComfyUI_temp
|
||||
- ./comfyui.log:/ComfyUI/comfyui.log
|
||||
|
||||
environment:
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
|
37
nodes_download.bash
Normal file
37
nodes_download.bash
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PIP_ROOT_USER_ACTION=ignore
|
||||
|
||||
# The list of nodes
|
||||
NODES=(
|
||||
"https://github.com/ciri/comfyui-model-downloader.git comfyui-model-downloader"
|
||||
"https://github.com/11cafe/comfyui-workspace-manager.git comfyui-workspace-manager"
|
||||
"https://github.com/ltdrdata/ComfyUI-Manager.git ComfyUI-Manager"
|
||||
)
|
||||
|
||||
# Node install function
|
||||
clone_and_install() {
|
||||
|
||||
cd /ComfyUI/custom_nodes
|
||||
|
||||
for repo in "${NODES[@]}"; do
|
||||
url=$(echo "$repo" | cut -d' ' -f1)
|
||||
name=$(echo "$repo" | cut -d' ' -f2)
|
||||
|
||||
if [ ! -d "$name" ] || [ -z "$(ls -A "$name")" ]; then
|
||||
echo "Cloning $name..."
|
||||
git clone "$url" "$name"
|
||||
|
||||
if [ -f "$name/requirements.txt" ]; then
|
||||
echo "Installing requirements for $name..."
|
||||
cd "$name"
|
||||
pip install -r requirements.txt
|
||||
cd ..
|
||||
fi
|
||||
else
|
||||
echo "Skipping $name, folder is not empty or already exists."
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
clone_and_install
|
Loading…
Reference in New Issue
Block a user