Skip to content

Commit

Permalink
moved main.py run to entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
cyntachs committed Aug 11, 2023
1 parent cf79ba0 commit 0b19482
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ ENV ROOT=/stable-diffusion
RUN mkdir ${ROOT}

EXPOSE 5555
ENTRYPOINT [ "sh" , "entrypoint.sh" ]
WORKDIR ${ROOT}
CMD python -u main.py --listen --port 5555 ${CLI_ARGS}
ENTRYPOINT [ "sh" , "entrypoint.sh" ]
7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

cd /

if [ ! -f "/stable-diffusion/.installed" ]; then
echo "Installing ComfyUI..."
git clone https://github.com/comfyanonymous/ComfyUI.git /stable-diffusion
Expand All @@ -21,10 +23,13 @@ if [ ! -f "/stable-diffusion/.installed" ]; then
git submodule update --init --recursive
python install.py

cd /stable-diffusion
cd /

touch /stable-diffusion/.installed
else
chmod +x /update.sh
sh /update.sh
fi;

cd /stable-diffusion
python -u main.py --listen --port 5555 ${CLI_ARGS}
2 changes: 2 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ cd ./custom_nodes/ComfyUI-Impact-Pack
git fetch https://github.com/ltdrdata/ComfyUI-Impact-Pack.git
git pull

cd /

echo "Done."

0 comments on commit 0b19482

Please sign in to comment.