Skip to content

Commit 09a0f11

Browse files
Add startup script for comfy (#552)
Closes #451 --------- Co-authored-by: PassiveLemon <[email protected]>
1 parent 6de45b1 commit 09a0f11

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ services:
6060
<<: *base_service
6161
profiles: ["comfy"]
6262
build: ./services/comfy/
63-
image: sd-comfy:3
63+
image: sd-comfy:4
6464
environment:
6565
- CLI_ARGS=
6666

services/comfy/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN --mount=type=cache,target=/root/.cache/pip \
3434
# add info
3535
COPY . /docker/
3636
RUN cp /docker/extra_model_paths.yaml ${ROOT}
37+
RUN chmod u+x /docker/entrypoint.sh
38+
RUN cp /docker/extra_model_paths.yaml ${ROOT}
3739

3840
ENV NVIDIA_VISIBLE_DEVICES=all
3941
ENV PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""

services/comfy/entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ for to_path in "${!MOUNTS[@]}"; do
2222
echo Mounted $(basename "${from_path}")
2323
done
2424

25+
if [ -f "/data/config/comfy/startup.sh" ]; then
26+
pushd ${ROOT}
27+
. /data/config/comfy/startup.sh
28+
popd
29+
fi
30+
2531
exec "$@"

0 commit comments

Comments
 (0)