mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(installer): remove unused update scripts and references thereto
This commit is contained in:
parent
7162ff04df
commit
03b1cde97d
@ -303,7 +303,6 @@ class InvokeAiInstance:
|
|||||||
|
|
||||||
ext = "bat" if OS == "Windows" else "sh"
|
ext = "bat" if OS == "Windows" else "sh"
|
||||||
|
|
||||||
# scripts = ['invoke', 'update']
|
|
||||||
scripts = ["invoke"]
|
scripts = ["invoke"]
|
||||||
|
|
||||||
for script in scripts:
|
for script in scripts:
|
||||||
|
@ -1,72 +0,0 @@
|
|||||||
@echo off
|
|
||||||
setlocal EnableExtensions EnableDelayedExpansion
|
|
||||||
|
|
||||||
PUSHD "%~dp0"
|
|
||||||
|
|
||||||
set INVOKE_AI_VERSION=latest
|
|
||||||
set arg=%1
|
|
||||||
if "%arg%" neq "" (
|
|
||||||
if "%arg:~0,2%" equ "/?" (
|
|
||||||
echo Usage: update.bat ^<release name or branch^>
|
|
||||||
echo Updates InvokeAI to use the indicated version of the code base.
|
|
||||||
echo Find the version or branch for the release you want, and pass it as the argument.
|
|
||||||
echo For example '.\update.bat v2.2.5' for release 2.2.5.
|
|
||||||
echo '.\update.bat main' for the latest development version
|
|
||||||
echo.
|
|
||||||
echo If no argument provided then will install the most recent release, equivalent to
|
|
||||||
echo '.\update.bat latest'
|
|
||||||
exit /b
|
|
||||||
) else (
|
|
||||||
set INVOKE_AI_VERSION=%arg%
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
set INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/!INVOKE_AI_VERSION!.zip"
|
|
||||||
set INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/!INVOKE_AI_VERSION!/environments-and-requirements/requirements-base.txt
|
|
||||||
set INVOKE_AI_MODELS=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/configs/INITIAL_MODELS.yaml
|
|
||||||
|
|
||||||
call curl -I "%INVOKE_AI_DEP%" -fs >.tmp.out
|
|
||||||
if %errorlevel% neq 0 (
|
|
||||||
echo '!INVOKE_AI_VERSION!' is not a known branch name or tag. Please check the version and try again.
|
|
||||||
echo "Press any key to continue"
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
del .tmp.out
|
|
||||||
|
|
||||||
echo This script will update InvokeAI and all its dependencies to !INVOKE_AI_SRC!.
|
|
||||||
echo If you do not want to do this, press control-C now!
|
|
||||||
pause
|
|
||||||
|
|
||||||
call curl -L "%INVOKE_AI_DEP%" > environments-and-requirements/requirements-base.txt
|
|
||||||
call curl -L "%INVOKE_AI_MODELS%" > configs/INITIAL_MODELS.yaml
|
|
||||||
|
|
||||||
|
|
||||||
call .venv\Scripts\activate.bat
|
|
||||||
call .venv\Scripts\python -mpip install -r requirements.txt
|
|
||||||
if %errorlevel% neq 0 (
|
|
||||||
echo Installation of requirements failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
call .venv\Scripts\python -mpip install !INVOKE_AI_SRC!
|
|
||||||
if %errorlevel% neq 0 (
|
|
||||||
echo Installation of InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
|
||||||
pause
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
|
|
||||||
@rem call .venv\Scripts\invokeai-configure --root=.
|
|
||||||
|
|
||||||
@rem if %errorlevel% neq 0 (
|
|
||||||
@rem echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
|
||||||
@rem pause
|
|
||||||
@rem exit /b
|
|
||||||
@rem )
|
|
||||||
|
|
||||||
echo InvokeAI has been updated to '%INVOKE_AI_VERSION%'
|
|
||||||
|
|
||||||
echo "Press any key to continue"
|
|
||||||
pause
|
|
||||||
endlocal
|
|
@ -1,58 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
if [ $# -ge 1 ] && [ "${1:0:2}" == "-h" ]; then
|
|
||||||
echo "Usage: update.sh <release>"
|
|
||||||
echo "Updates InvokeAI to use the indicated version of the code base."
|
|
||||||
echo "Find the version or branch for the release you want, and pass it as the argument."
|
|
||||||
echo "For example: update.sh v2.2.5 for release 2.2.5."
|
|
||||||
echo " update.sh main for the current development version."
|
|
||||||
echo ""
|
|
||||||
echo "If no argument provided then will install the version tagged with 'latest', equivalent to"
|
|
||||||
echo "update.sh latest"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
INVOKE_AI_VERSION=${1:-latest}
|
|
||||||
|
|
||||||
INVOKE_AI_SRC="https://github.com/invoke-ai/InvokeAI/archive/$INVOKE_AI_VERSION.zip"
|
|
||||||
INVOKE_AI_DEP=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/environments-and-requirements/requirements-base.txt
|
|
||||||
INVOKE_AI_MODELS=https://raw.githubusercontent.com/invoke-ai/InvokeAI/$INVOKE_AI_VERSION/configs/INITIAL_MODELS.yaml
|
|
||||||
|
|
||||||
# ensure we're in the correct folder in case user's CWD is somewhere else
|
|
||||||
scriptdir=$(dirname "$0")
|
|
||||||
cd "$scriptdir"
|
|
||||||
|
|
||||||
function _err_exit {
|
|
||||||
if test "$1" -ne 0
|
|
||||||
then
|
|
||||||
echo "Something went wrong while installing InvokeAI and/or its requirements."
|
|
||||||
echo "Update cannot continue. Please report this error to https://github.com/invoke-ai/InvokeAI/issues"
|
|
||||||
echo -e "Error code $1; Error caught was '$2'"
|
|
||||||
read -p "Press any key to exit..."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! curl -I "$INVOKE_AI_DEP" -fs >/dev/null; then
|
|
||||||
echo \'$INVOKE_AI_VERSION\' is not a known branch name or tag. Please check the version and try again.
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo This script will update InvokeAI and all its dependencies to version \'$INVOKE_AI_VERSION\'.
|
|
||||||
echo If you do not want to do this, press control-C now!
|
|
||||||
read -p "Press any key to continue, or CTRL-C to exit..."
|
|
||||||
|
|
||||||
curl -L "$INVOKE_AI_DEP" > environments-and-requirements/requirements-base.txt
|
|
||||||
curl -L "$INVOKE_AI_MODELS" > configs/INITIAL_MODELS.yaml
|
|
||||||
|
|
||||||
. .venv/bin/activate
|
|
||||||
|
|
||||||
./.venv/bin/python -mpip install -r requirements.txt
|
|
||||||
_err_exit $? "The pip program failed to install InvokeAI's requirements."
|
|
||||||
|
|
||||||
./.venv/bin/python -mpip install $INVOKE_AI_SRC
|
|
||||||
_err_exit $? "The pip program failed to install InvokeAI."
|
|
||||||
|
|
||||||
echo InvokeAI updated to \'$INVOKE_AI_VERSION\'
|
|
Loading…
Reference in New Issue
Block a user