diff --git a/.devscripts/chmod.sh b/.devscripts/chmod.sh index d4af583..d925b42 100755 --- a/.devscripts/chmod.sh +++ b/.devscripts/chmod.sh @@ -2,4 +2,4 @@ set -Eeuo pipefail -find . -name "*.sh" -exec git update-index --chmod=+x {} \; +find services -name "*.sh" -exec git update-index --chmod=+x {} \; diff --git a/scripts/migratev1tov2.sh b/.devscripts/migratev1tov2.sh similarity index 100% rename from scripts/migratev1tov2.sh rename to .devscripts/migratev1tov2.sh diff --git a/docker-compose.yml b/docker-compose.yml index 3d5ad96..1422685 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,20 +23,11 @@ services: volumes: - *v1 - hlky: - <<: *base_service - profiles: ["hlky"] - build: ./services/hlky/ - image: sd-hlky:3 - environment: - - CLI_ARGS=--optimized-turbo - - USE_STREAMLIT=0 - auto: &automatic <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 - image: sd-auto:4 + image: sd-auto:9 environment: - CLI_ARGS=--allow-code --medvram --xformers @@ -47,11 +38,20 @@ services: environment: - CLI_ARGS=--no-half --precision full + hlky: + <<: *base_service + profiles: ["hlky"] + build: ./services/hlky/ + image: sd-hlky:6 + environment: + - CLI_ARGS=--optimized-turbo + - USE_STREAMLIT=0 + lstein: <<: *base_service profiles: ["lstein"] build: ./services/lstein/ - image: sd-lstein:3 + image: sd-lstein:4 environment: - PRELOAD=true - CLI_ARGS= diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index 1e20e79..d09f1d4 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -36,26 +36,28 @@ ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 PIP_NO_CACHE_DIR=1 RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113 -RUN apt-get update && apt install fonts-dejavu-core rsync git -y && apt-get clean +RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y && apt-get clean RUN </data/config/auto/ui-config.json fi +# copy scripts, we cannot just mount the directory because it will override the already provided scripts in the repo +cp -rfT /data/config/auto/scripts/ "${ROOT}/scripts" + declare -A MOUNTS MOUNTS["/root/.cache"]="/data/.cache" @@ -29,6 +33,7 @@ MOUNTS["${ROOT}/models/hypernetworks"]="/data/Hypernetworks" MOUNTS["${ROOT}/embeddings"]="/data/embeddings" MOUNTS["${ROOT}/config.json"]="/data/config/auto/config.json" MOUNTS["${ROOT}/ui-config.json"]="/data/config/auto/ui-config.json" +MOUNTS["${ROOT}/extensions"]="/data/config/auto/extensions" # extra hacks MOUNTS["${ROOT}/repositories/CodeFormer/weights/facelib"]="/data/.cache" @@ -46,3 +51,12 @@ for to_path in "${!MOUNTS[@]}"; do done mkdir -p /output/saved /output/txt2img-images/ /output/img2img-images /output/extras-images/ /output/grids/ /output/txt2img-grids/ /output/img2img-grids/ + +if [ -f "/data/config/auto/startup.sh" ]; then + pushd ${ROOT} + . /data/config/auto/startup.sh + popd +fi + + +exec "$@" diff --git a/services/hlky/Dockerfile b/services/hlky/Dockerfile index 877f89d..75d1b40 100644 --- a/services/hlky/Dockerfile +++ b/services/hlky/Dockerfile @@ -12,17 +12,20 @@ RUN conda install pytorch==1.11.0 torchvision==0.12.0 cudatoolkit=11.3 -c pytorc RUN apt-get update && apt install fonts-dejavu-core rsync gcc -y && apt-get clean +ENV PIP_PREFER_BINARY=1 PIP_NO_CACHE_DIR=1 + RUN <