Skip to content

Commit

Permalink
Add startup script for comfy (#552)
Browse files Browse the repository at this point in the history
Closes #451

---------

Co-authored-by: PassiveLemon <lemonl3mn@protonmail.com>
  • Loading branch information
AbdBarho and PassiveLemon committed Jul 22, 2023
1 parent 6de45b1 commit 09a0f11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ services:
<<: *base_service
profiles: ["comfy"]
build: ./services/comfy/
image: sd-comfy:3
image: sd-comfy:4
environment:
- CLI_ARGS=

Expand Down
2 changes: 2 additions & 0 deletions services/comfy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN --mount=type=cache,target=/root/.cache/pip \
# add info
COPY . /docker/
RUN cp /docker/extra_model_paths.yaml ${ROOT}
RUN chmod u+x /docker/entrypoint.sh
RUN cp /docker/extra_model_paths.yaml ${ROOT}

ENV NVIDIA_VISIBLE_DEVICES=all
ENV PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
Expand Down
6 changes: 6 additions & 0 deletions services/comfy/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ for to_path in "${!MOUNTS[@]}"; do
echo Mounted $(basename "${from_path}")
done

if [ -f "/data/config/comfy/startup.sh" ]; then
pushd ${ROOT}
. /data/config/comfy/startup.sh
popd
fi

exec "$@"

0 comments on commit 09a0f11

Please sign in to comment.