Reordered, moved optional install to script.

This commit is contained in:
Imaginator 2022-10-17 20:51:43 -04:00
parent f06947e97e
commit 8437223131
3 changed files with 11 additions and 25 deletions

View file

@ -38,16 +38,6 @@ services:
environment:
- CLI_ARGS=--allow-code --medvram --xformers
auto-deepdanbooru:
<<: *automatic
profiles: ["auto-deepdanbooru"]
build:
context: ./services/AUTOMATIC1111
args:
- DEEPDANBOORU=1
environment:
- CLI_ARGS=--allow-code --medvram --xformers --deepdanbooru
auto-cpu:
<<: *automatic
profiles: ["auto-cpu"]

View file

@ -53,6 +53,11 @@ RUN pip install --prefer-binary --no-cache-dir -r ${ROOT}/repositories/CodeForme
# TODO: move to top
RUN apt-get install jq moreutils -y
COPY . /docker
RUN chmod +x /docker/*.sh
ARG DEEPDANBOORU="0"
RUN [[ ${DEEPDANBOORU:-"0"} == "0" ]] && : || /docker/optional-deepdanbooru.sh
# Note: don't update the sha of previous versions because the install will take forever
# instead, update the repo state in a later step
@ -73,21 +78,7 @@ RUN pip install --prefer-binary --no-cache-dir opencv-python-headless \
COPY --from=xformers /wheel.whl xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
RUN pip install xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
ARG DEEPDANBOORU=0
RUN <<EOF
if ["$DEEPDANBOORU" = "1"]
then
pip install tensorflow
pip install tensorflow-io
pip install git+https://github.com/KichangKim/DeepDanbooru.git@edf73df4cdaeea2cf00e9ac08bd8a9026b7a7b26#egg=deepdanbooru deepdanbooru
fi
EOF
COPY . /docker
RUN <<EOF
chmod +x /docker/mount.sh && python3 /docker/info.py ${ROOT}/modules/ui.py
EOF
RUN python3 /docker/info.py ${ROOT}/modules/ui.py
ENV CLI_ARGS=""
WORKDIR ${WORKDIR}

View file

@ -0,0 +1,5 @@
#!/bin/bash
pip install tensorflow==2.10
pip install tensorflow-io==0.27.0
pip install git+https://github.com/KichangKim/DeepDanbooru.git@edf73df4cdaeea2cf00e9ac08bd8a9026b7a7b26#egg=deepdanbooru deepdanbooru