Updating so webui-user.sh does not have to be updated on first run
This commit is contained in:
parent
af9c20d3b9
commit
c5a9ae6d6d
|
@ -7,8 +7,8 @@ services:
|
|||
ports:
|
||||
- "7860:7860"
|
||||
volumes:
|
||||
- ./sd:/sd
|
||||
- "/path/to/models:/sd/models/Stable-diffusion"
|
||||
- ./:/repo # The path the repo will be cloned into if it does not already exist
|
||||
# - "/path/to/models:/sd/models/Stable-diffusion/remote" # The path to existing models to use
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
|
@ -17,8 +17,8 @@ services:
|
|||
device_ids: ['0']
|
||||
capabilities: [gpu]
|
||||
healthcheck:
|
||||
test: "wget --no-verbose --tries=1 --spider http://auto-sd-docker:7860 || exit 1"
|
||||
interval: 2m
|
||||
timeout: 30s
|
||||
test: "wget --no-verbose --tries=1 --spider http://localhost:7860 || exit 1"
|
||||
interval: 60s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 5m
|
||||
start_period: 300s
|
|
@ -4,7 +4,7 @@
|
|||
#######################################################
|
||||
|
||||
# Determine if repo is already cloned
|
||||
if [[ -d /sd/.git && -f /sd/webui.sh ]]
|
||||
if [[ -d /repo/.git && -f /repo/webui.sh ]]
|
||||
then
|
||||
# repo already cloned
|
||||
echo "Repo already cloned."
|
||||
|
@ -12,17 +12,17 @@ else
|
|||
# clone the repo
|
||||
echo "Repo missing, cloning now."
|
||||
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git /repo_temp
|
||||
rsync -a /repo_temp/ /sd/
|
||||
rsync -a /repo_temp/ /repo/
|
||||
rm -rf /repo_temp
|
||||
fi
|
||||
|
||||
cd /sd
|
||||
cd /repo
|
||||
|
||||
# --listen is always required while running inside a container
|
||||
if [[ ! $COMMANDLINE_ARGS =~ "--listen" ]]
|
||||
then
|
||||
# this could still be overwritten by webui-user.sh
|
||||
COMMANDLINE_ARGS="--listen ${COMMANDLINE_ARGS}"
|
||||
export COMMANDLINE_ARGS="--listen ${COMMANDLINE_ARGS}"
|
||||
fi
|
||||
|
||||
# Start webui.sh, -f flag allows running as root
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#clone_dir="stable-diffusion-webui"
|
||||
|
||||
# Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
|
||||
#export COMMANDLINE_ARGS=""
|
||||
#export COMMANDLINE_ARGS="$COMMANDLINE_ARGS"
|
||||
|
||||
# python3 executable
|
||||
#python_cmd="python3"
|
||||
|
|
Loading…
Reference in New Issue