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,47 +1,49 @@
version: '3.9'
x-base_service: &base_service
ports:
- "7860:7860"
volumes:
- &v1 ./data:/data
- &v2 ./output:/output
stop_signal: SIGINT
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [compute, utility]
x-base_service:
&base_service
ports:
- "24567:7860"
volumes:
- &v1 ./data:/data
- &v2 ./output:/output
stop_signal: SIGINT
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: [ '0' ]
capabilities: [ compute, utility ]
name: webui-docker
services:
download:
build: ./services/download/
profiles: ["download"]
profiles: [ "download" ]
volumes:
- *v1
auto: &automatic
auto:
&automatic
<<: *base_service
profiles: ["auto"]
profiles: [ "auto" ]
build: ./services/AUTOMATIC1111
image: sd-auto:58
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:
<<: *automatic
profiles: ["auto-cpu"]
profiles: [ "auto-cpu" ]
deploy: {}
environment:
- CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api
invoke: &invoke
invoke:
&invoke
<<: *base_service
profiles: ["invoke"]
profiles: [ "invoke" ]
build: ./services/invoke/
image: sd-invoke:29
environment:
@ -55,19 +57,19 @@ services:
# - PRELOAD=true
# - CLI_ARGS=--always_use_cpu
comfy: &comfy
comfy:
&comfy
<<: *base_service
profiles: ["comfy"]
profiles: [ "comfy" ]
build: ./services/comfy/
image: sd-comfy:2
tty: true
environment:
- CLI_ARGS=
comfy-cpu:
<<: *comfy
profiles: ["comfy-cpu"]
profiles: [ "comfy-cpu" ]
deploy: {}
environment:
- CLI_ARGS=--cpu