From c2f5033a9d8a080447af03a4865bb5fb412d11a7 Mon Sep 17 00:00:00 2001 From: Mat Date: Wed, 24 May 2023 08:11:41 +0200 Subject: [PATCH] unified prefix, less options --- .gitignore | 2 +- docker-compose.yml | 18 +++++++++--------- example.env | 27 +++++++++------------------ 3 files changed, 19 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 51b745f..720b21f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ /docker-compose.override.yml # Environment variable files -.env +.env* # VSCode specific *.code-workspace diff --git a/docker-compose.yml b/docker-compose.yml index 6956ec0..429059e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,10 @@ version: "3.9" x-base_service: &base_service ports: - - "${HOST_PORT:-7860}:7860" + - "${WEBUI_PORT:-7860}:7860" volumes: - - &v1 "${HOST_DATA_VOL:-./data}:/data" - - &v2 "${HOST_OUT_VOL:-./output}:/output" + - &v1 "${WEBUI_DATA_VOL:-./data}:/data" + - &v2 "${WEBUI_OUT_VOL:-./output}:/output" stop_signal: SIGINT deploy: resources: @@ -30,14 +30,14 @@ services: build: ./services/AUTOMATIC1111 image: sd-auto:56 environment: - - CLI_ARGS=${AUTO_CLI_ARGS:-"--allow-code --medvram --xformers --enable-insecure-extension-access --api"} + - CLI_ARGS=${WEB_UI_ARGS:-"--allow-code --medvram --xformers --enable-insecure-extension-access --api"} auto-cpu: <<: *automatic profiles: ["auto-cpu"] deploy: {} environment: - - CLI_ARGS=${AUTO_CPU_CLI_ARGS:-"--no-half --precision full --allow-code --enable-insecure-extension-access --api"} + - CLI_ARGS=${WEB_UI_ARGS:-"--no-half --precision full --allow-code --enable-insecure-extension-access --api"} invoke: &invoke <<: *base_service @@ -46,14 +46,14 @@ services: image: sd-invoke:28 environment: - PRELOAD=true - - CLI_ARGS=${INVOKE_CLI_ARGS:-"--xformers"} + - CLI_ARGS=${WEB_UI_ARGS:-"--xformers"} # invoke-cpu: # <<: *invoke # profiles: ["invoke-cpu"] # environment: # - PRELOAD=true - # - CLI_ARGS=${INVOKE_CPU_CLI_ARGS:-"--always_use_cpu"} + # - CLI_ARGS=${WEB_UI_ARGS:-"--always_use_cpu"} comfy: &comfy <<: *base_service @@ -62,11 +62,11 @@ services: image: sd-comfy:2 tty: true environment: - - CLI_ARGS=${COMFY_CLI_ARGS:-""} + - CLI_ARGS=${WEB_UI_ARGS:-""} comfy-cpu: <<: *comfy profiles: ["comfy-cpu"] deploy: {} environment: - - CLI_ARGS=${COMFY_CPU_CLI_ARGS:-"--cpu"} + - CLI_ARGS=${WEB_UI_ARGS:-"--cpu"} diff --git a/example.env b/example.env index c5f79da..637fbb1 100644 --- a/example.env +++ b/example.env @@ -8,35 +8,26 @@ # Don't forget to move/copy the files to the new location, if you changed mounts # You can see the default values in docker-compose.yml +# For custom settings per profile you can use the command line to overwrite variables. +# It is also possible to use multiple .env files like .env-auto + .env-invoke and use the --env-file option. +# For more customisation use a docker-override.yml +# Delete your docker-override.yml and .env files to go back to defaults + ########################## ### NETWORK ### ########################## ## The port on your machine ## -#HOST_PORT=7860 - -########################## -### MOUNTS ### -########################## +#WEBUI_PORT=7860 ## Models, settings and other persistent files -#HOST_DATA_VOL=./data +#WEBUI_DATA_VOL=./data ## Target path for generated images ## -#HOST_OUT_VOL=./output +#WEBUI_OUT_VOL=./output ########################## ### CONTAINER SETTINGS ### ########################## -## AUTO + AUTO using CPU ## -#AUTO_CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api -#AUTO_CPU_CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api - -## Invoke + Invoke using CPU ## -#INVOKE_CLI_ARGS=--xformers -#INVOKE_CPU_CLI_ARGS=--always_use_cpu - -## Comfy + Comfy using CPU ## -#COMFY_CLI_ARGS= -#COMFY_CPU_CLI_ARGS=--cpu +#WEB_UI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api