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