Skip to content

Commit a5218b8

Browse files
authored
Auto Extensions (deforum-art#176)
Closes #148 Closes #172
1 parent d6cbafd commit a5218b8

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.devscripts/chmod.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -Eeuo pipefail
44

5-
find . -name "*.sh" -exec git update-index --chmod=+x {} \;
5+
find services -name "*.sh" -exec git update-index --chmod=+x {} \;

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ services:
3636
<<: *base_service
3737
profiles: ["auto"]
3838
build: ./services/AUTOMATIC1111
39-
image: sd-auto:6
39+
image: sd-auto:7
4040
environment:
4141
- CLI_ARGS=--allow-code --medvram --xformers
4242

services/AUTOMATIC1111/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ RUN pip install opencv-python-headless \
8080

8181
COPY . /docker
8282

83-
RUN chmod +x /docker/mount.sh && python3 /docker/info.py ${ROOT}/modules/ui.py
83+
RUN chmod +x /docker/entrypoint.sh && python3 /docker/info.py ${ROOT}/modules/ui.py
8484

8585
WORKDIR ${ROOT}/repositories/stable-diffusion
8686
ENV CLI_ARGS=""
8787
EXPOSE 7860
88+
ENTRYPOINT ["/docker/entrypoint.sh"]
8889
# run, -u to not buffer stdout / stderr
89-
CMD /docker/mount.sh && \
90-
python3 -u ../../webui.py --listen --port 7860 --ckpt-dir ${ROOT}/models/Stable-diffusion --theme dark ${CLI_ARGS}
90+
CMD python3 -u ../../webui.py --listen --port 7860 --ckpt-dir ${ROOT}/models/Stable-diffusion --theme dark ${CLI_ARGS}

services/AUTOMATIC1111/mount.sh renamed to services/AUTOMATIC1111/entrypoint.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
set -Eeuo pipefail
44

5+
# TODO: move all mkdir -p ?
56
mkdir -p /data/config/auto/scripts/
67
cp -n /docker/config.json /data/config/auto/config.json
78
jq '. * input' /data/config/auto/config.json /docker/config.json | sponge /data/config/auto/config.json
@@ -32,6 +33,7 @@ MOUNTS["${ROOT}/models/hypernetworks"]="/data/Hypernetworks"
3233
MOUNTS["${ROOT}/embeddings"]="/data/embeddings"
3334
MOUNTS["${ROOT}/config.json"]="/data/config/auto/config.json"
3435
MOUNTS["${ROOT}/ui-config.json"]="/data/config/auto/ui-config.json"
36+
MOUNTS["${ROOT}/extensions"]="/data/config/auto/extensions"
3537

3638
# extra hacks
3739
MOUNTS["${ROOT}/repositories/CodeFormer/weights/facelib"]="/data/.cache"
@@ -49,3 +51,12 @@ for to_path in "${!MOUNTS[@]}"; do
4951
done
5052

5153
mkdir -p /output/saved /output/txt2img-images/ /output/img2img-images /output/extras-images/ /output/grids/ /output/txt2img-grids/ /output/img2img-grids/
54+
55+
if [ -f "/data/config/auto/startup.sh" ]; then
56+
pushd ${ROOT}
57+
. /data/config/auto/startup.sh
58+
popd
59+
fi
60+
61+
62+
exec "$@"

0 commit comments

Comments
 (0)