Merge pull request #1 from machinshin/features/add-auth

change port to 24567; add gradio auth from envvar
This commit is contained in:
Vat 2023-06-20 19:01:03 -07:00 committed by GitHub
commit 074a4b02b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 26 deletions

2
.env.sample Normal file
View file

@ -0,0 +1,2 @@
# https://github.com/uprestech/company_start_todo/issues/249
GRADIO_AUTH="" # user1:pass1,user2:pass2

View file

@ -1,8 +1,9 @@
version: '3.9' version: '3.9'
x-base_service: &base_service x-base_service:
&base_service
ports: ports:
- "7860:7860" - "24567:7860"
volumes: volumes:
- &v1 ./data:/data - &v1 ./data:/data
- &v2 ./output:/output - &v2 ./output:/output
@ -24,14 +25,14 @@ services:
volumes: volumes:
- *v1 - *v1
auto: &automatic auto:
&automatic
<<: *base_service <<: *base_service
profiles: [ "auto" ] profiles: [ "auto" ]
build: ./services/AUTOMATIC1111 build: ./services/AUTOMATIC1111
image: sd-auto:58 image: sd-auto:58
environment: environment:
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api --gradio-auth ${GRADIO_AUTH}
auto-cpu: auto-cpu:
<<: *automatic <<: *automatic
profiles: [ "auto-cpu" ] profiles: [ "auto-cpu" ]
@ -39,7 +40,8 @@ services:
environment: environment:
- CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api - CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api
invoke: &invoke invoke:
&invoke
<<: *base_service <<: *base_service
profiles: [ "invoke" ] profiles: [ "invoke" ]
build: ./services/invoke/ build: ./services/invoke/
@ -55,7 +57,8 @@ services:
# - PRELOAD=true # - PRELOAD=true
# - CLI_ARGS=--always_use_cpu # - CLI_ARGS=--always_use_cpu
comfy: &comfy comfy:
&comfy
<<: *base_service <<: *base_service
profiles: [ "comfy" ] profiles: [ "comfy" ]
build: ./services/comfy/ build: ./services/comfy/
@ -64,7 +67,6 @@ services:
environment: environment:
- CLI_ARGS= - CLI_ARGS=
comfy-cpu: comfy-cpu:
<<: *comfy <<: *comfy
profiles: [ "comfy-cpu" ] profiles: [ "comfy-cpu" ]