InvokeAI/installer/create_installer.sh
Lincoln Stein 4fd97ceddd
remove redundant code line (#2068)
* remove redundant code line

install.bat was copying the requirements file into the install folder
twice, causing an error message on the second try. This fixes the
issue.

* add further improvements to installer

- Windows version will unzip to have requirements.txt already in
  the right location, to prevent problems when users try to run
  the .bat script from within a mounted read-only zip file manager.

- Do not assume that "pip" is on the path in either the .bat or shell
  versions of the update script.
2022-12-19 14:57:41 +00:00

50 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
VERSION=$(grep ^VERSION ../setup.py | awk '{ print $3 }' | sed "s/'//g" )
VERSION="$VERSION-p5"
echo "Be certain that you're in the 'installer' directory before continuing."
read -p "Press any key to continue, or CTRL-C to exit..."
echo Building installer zip fles for InvokeAI v$VERSION
# get rid of any old ones
rm *.zip
rm -rf InvokeAI-Installer
mkdir InvokeAI-Installer
cp -pr ../environments-and-requirements templates readme.txt InvokeAI-Installer/
mkdir InvokeAI-Installer/templates/rootdir
cp -pr ../configs InvokeAI-Installer/templates/rootdir/
mkdir InvokeAI-Installer/templates/rootdir/{outputs,embeddings,models}
cp install.sh.in InvokeAI-Installer/install.sh
chmod a+rx InvokeAI-Installer/install.sh
zip -r InvokeAI-installer-$VERSION-linux.zip InvokeAI-Installer
zip -r InvokeAI-installer-$VERSION-mac.zip InvokeAI-Installer
# now do the windows installer
rm InvokeAI-Installer/install.sh
cp install.bat.in InvokeAI-Installer/install.bat
cp WinLongPathsEnabled.reg InvokeAI-Installer/
# this gets rid of the "-e ." at the end of the windows requirements file
# because it is easier to do it now than in the .bat install script
egrep -v '^-e .' InvokeAI-Installer/environments-and-requirements/requirements-win-colab-cuda.txt > InvokeAI-Installer/requirements.txt
cp InvokeAI-Installer/requirements.txt InvokeAI-Installer/environments-and-requirements/requirements-win-colab-cuda.txt
zip -r InvokeAI-installer-$VERSION-windows.zip InvokeAI-Installer
# clean up
rm -rf InvokeAI-Installer
exit 0