-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c561675
commit 8298f7a
Showing
5 changed files
with
55 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
#!/bin/bash | ||
umask 002 | ||
branch=master | ||
|
||
source /opt/ai-dock/bin/venv-set.sh webui | ||
|
||
if [[ -n "${WEBUI_BRANCH}" ]]; then | ||
branch="${WEBUI_BRANCH}" | ||
if [[ -n "${WEBUI_REF}" ]]; then | ||
ref="${WEBUI_REF}" | ||
else | ||
# The latest tagged release | ||
ref="$(curl -s https://api.github.com/repos/AUTOMATIC1111/stable-diffusion-webui/tags | \ | ||
jq -r '.[0].name')" | ||
fi | ||
|
||
# -b flag has priority | ||
while getopts b: flag | ||
# -r argument has priority | ||
while getopts r: flag | ||
do | ||
case "${flag}" in | ||
b) branch="$OPTARG";; | ||
r) ref="$OPTARG";; | ||
esac | ||
done | ||
|
||
printf "Updating stable-diffusion-webui (${branch})...\n" | ||
[[ -n $ref ]] || { echo "Failed to get update target"; exit 1; } | ||
|
||
printf "Updating A1111 WebUI (${ref})...\n" | ||
|
||
cd /opt/stable-diffusion-webui | ||
git fetch --tags | ||
git checkout ${branch} | ||
git checkout ${ref} | ||
git pull | ||
|
||
"$WEBUI_VENV_PIP" install --no-cache-dir -r requirements_versions.txt | ||
"$WEBUI_VENV_PIP" install --no-cache-dir -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters