Merge branch 'main' into source-installer-improvements

This commit is contained in:
Lincoln Stein
2022-12-01 19:45:47 +00:00
6 changed files with 112 additions and 15 deletions

View File

@ -9,7 +9,8 @@ read -p "Press any key to continue, or CTRL-C to exit..."
# make the installer zip for linux and mac
rm -rf InvokeAI
mkdir -p InvokeAI
cp install.sh InvokeAI
cp install.sh.in InvokeAI/install.sh
chmod a+x InvokeAI/install.sh
cp readme.txt InvokeAI
zip -r InvokeAI-linux.zip InvokeAI
@ -18,7 +19,7 @@ zip -r InvokeAI-mac.zip InvokeAI
# make the installer zip for windows
rm -rf InvokeAI
mkdir -p InvokeAI
cp install.bat InvokeAI
cp install.bat.in InvokeAI/install.bat
cp readme.txt InvokeAI
cp WinLongPathsEnabled.reg InvokeAI

View File

@ -140,7 +140,11 @@ set err_msg=----- InvokeAI setup failed -----
.venv\Scripts\python -m pip install %no_cache_dir% --no-warn-script-location -e .
if %errorlevel% neq 0 goto err_exit
<<<<<<< HEAD:binary_installer/install.bat
copy binary_installer\invoke.bat .\invoke.bat
=======
copy installer\invoke.bat.in .\invoke.bat
>>>>>>> main:binary_installer/install.bat.in
echo ***** Installed invoke launcher script ******
@rem more cleanup

View File

@ -1,5 +1,9 @@
#!/usr/bin/env bash
# ensure we're in the correct folder in case user's CWD is somewhere else
scriptdir=$(dirname "$0")
cd "$scriptdir"
set -euo pipefail
IFS=$'\n\t'
@ -22,6 +26,8 @@ function _err_exit {
# This enables a user to install this project without manually installing git or Python
echo -e "\n***** Installing InvokeAI into $(pwd)... *****\n"
export no_cache_dir="--no-cache-dir"
if [ $# -ge 1 ]; then
if [ "$1" = "use-cache" ]; then
@ -29,10 +35,6 @@ if [ $# -ge 1 ]; then
fi
fi
echo "$no_cache_dir"
echo -e "\n***** Installing InvokeAI... *****\n"
OS_NAME=$(uname -s)
case "${OS_NAME}" in
@ -80,19 +82,17 @@ if [ "$OS_NAME" == "darwin" ] && [ "$OS_ARCH" == "arm64" ]; then
fi
# config
echo "USING development BRANCH. REMEMBER TO CHANGE TO main BEFORE RELEASE"
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
MICROMAMBA_DOWNLOAD_URL="https://micro.mamba.pm/api/micromamba/${MAMBA_OS_NAME}-${MAMBA_ARCH}/latest"
RELEASE_URL=https://github.com/invoke-ai/InvokeAI
# RELEASE_SOURCEBALL=/archive/refs/heads/main.tar.gz
# RELEASE_SOURCEBALL=/archive/refs/heads/test-installer.tar.gz
RELEASE_SOURCEBALL=/archive/refs/heads/development.tar.gz
RELEASE_SOURCEBALL=/archive/refs/heads/main.tar.gz
PYTHON_BUILD_STANDALONE_URL=https://github.com/indygreg/python-build-standalone/releases/download
if [ "$OS_NAME" == "darwin" ]; then
PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-${PY_ARCH}-apple-darwin-install_only.tar.gz
elif [ "$OS_NAME" == "linux" ]; then
PYTHON_BUILD_STANDALONE=20221002/cpython-3.10.7+20221002-${PY_ARCH}-unknown-linux-gnu-install_only.tar.gz
fi
echo "INSTALLING $RELEASE_SOURCEBALL FROM $RELEASE_URL"
PACKAGES_TO_INSTALL=""
@ -192,28 +192,33 @@ echo -e "We're running under"
_err_exit $? _err_msg
_err_msg="\n----- pip update failed -----\n"
.venv/bin/python3 -m pip install "$no_cache_dir" --no-warn-script-location --upgrade pip wheel
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location --upgrade pip
_err_exit $? _err_msg
echo -e "\n***** Updated pip and wheel *****\n"
echo -e "\n***** Updated pip *****\n"
_err_msg="\n----- requirements file copy failed -----\n"
cp binary_installer/py3.10-${OS_NAME}-"${OS_ARCH}"-${CD}-reqs.txt requirements.txt
_err_exit $? _err_msg
_err_msg="\n----- main pip install failed -----\n"
.venv/bin/python3 -m pip install "$no_cache_dir" --no-warn-script-location -r requirements.txt
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location -r requirements.txt
_err_exit $? _err_msg
echo -e "\n***** Installed Python dependencies *****\n"
_err_msg="\n----- InvokeAI setup failed -----\n"
.venv/bin/python3 -m pip install "$no_cache_dir" --no-warn-script-location -e .
.venv/bin/python3 -m pip install $no_cache_dir --no-warn-script-location -e .
_err_exit $? _err_msg
echo -e "\n***** Installed InvokeAI *****\n"
<<<<<<< HEAD:binary_installer/install.sh
cp binary_installer/invoke.sh .
=======
cp installer/invoke.sh.in ./invoke.sh
chmod a+x ./invoke.sh
>>>>>>> main:binary_installer/install.sh.in
echo -e "\n***** Installed invoke launcher script ******\n"
# more cleanup
@ -227,6 +232,8 @@ deactivate
echo -e "\n***** Finished downloading models *****\n"
echo "All done! Run the command './invoke.sh' to start InvokeAI."
echo "All done! Run the command"
echo " \"$scriptdir/invoke.sh\""
echo "to start InvokeAI."
read -p "Press any key to exit..."
exit

View File