mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
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.
This commit is contained in:
parent
ded49523cd
commit
4fd97ceddd
@ -3,7 +3,7 @@
|
|||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
VERSION=$(grep ^VERSION ../setup.py | awk '{ print $3 }' | sed "s/'//g" )
|
VERSION=$(grep ^VERSION ../setup.py | awk '{ print $3 }' | sed "s/'//g" )
|
||||||
VERSION="$VERSION-p1"
|
VERSION="$VERSION-p5"
|
||||||
|
|
||||||
echo "Be certain that you're in the 'installer' directory before continuing."
|
echo "Be certain that you're in the 'installer' directory before continuing."
|
||||||
read -p "Press any key to continue, or CTRL-C to exit..."
|
read -p "Press any key to continue, or CTRL-C to exit..."
|
||||||
@ -36,8 +36,8 @@ cp WinLongPathsEnabled.reg InvokeAI-Installer/
|
|||||||
|
|
||||||
# this gets rid of the "-e ." at the end of the windows requirements file
|
# 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
|
# 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 >requirements.txt
|
egrep -v '^-e .' InvokeAI-Installer/environments-and-requirements/requirements-win-colab-cuda.txt > InvokeAI-Installer/requirements.txt
|
||||||
mv requirements.txt InvokeAI-Installer/environments-and-requirements/requirements-win-colab-cuda.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
|
zip -r InvokeAI-installer-$VERSION-windows.zip InvokeAI-Installer
|
||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
|
@ -124,8 +124,6 @@ call "%rootdir%\.venv\Scripts\activate.bat"
|
|||||||
set PYTHON=%rootdir%\.venv\Scripts\python
|
set PYTHON=%rootdir%\.venv\Scripts\python
|
||||||
echo updating pip with "%PYTHON%"
|
echo updating pip with "%PYTHON%"
|
||||||
call "%PYTHON%" -mensurepip --upgrade
|
call "%PYTHON%" -mensurepip --upgrade
|
||||||
|
|
||||||
copy environments-and-requirements\requirements-win-colab-cuda.txt .\requirements.txt
|
|
||||||
call "%PYTHON%" -mpip install --prefer-binary -r requirements.txt
|
call "%PYTHON%" -mpip install --prefer-binary -r requirements.txt
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
set err_msg=Requirements installation failed. See above for errors and check %TROUBLESHOOTING% for potential solutions.
|
set err_msg=Requirements installation failed. See above for errors and check %TROUBLESHOOTING% for potential solutions.
|
||||||
|
@ -27,19 +27,19 @@ 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!
|
echo If you do not want to do this, press control-C now!
|
||||||
pause
|
pause
|
||||||
|
|
||||||
call pip install -r requirements.txt
|
call .venv\Scripts\python -mpip install -r requirements.txt
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
echo Installation of requirements failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
echo Installation of requirements failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
call pip install !INVOKE_AI_SRC!
|
call .venv\Scripts\python -mpip install !INVOKE_AI_SRC!
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
echo Installation of InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
echo Installation of InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
call .venv\Scripts\python .venv\Scripts\configure_invokeai.py --root="%rootdir%"
|
call .venv\Scripts\python .venv\Scripts\configure_invokeai.py --root=.
|
||||||
|
|
||||||
if %errorlevel% neq 0 (
|
if %errorlevel% neq 0 (
|
||||||
echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
echo Configuration InvokeAI failed. See https://invoke-ai.github.io/InvokeAI/installation/INSTALL_AUTOMATED/#troubleshooting for suggestions.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
@ -36,13 +36,13 @@ read -p "Press any key to continue, or CTRL-C to exit..."
|
|||||||
|
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate
|
||||||
|
|
||||||
pip install -r requirements.txt
|
./.venv/bin/python -mpip install -r requirements.txt
|
||||||
_err_exit $? "The pip program failed to install InvokeAI's requirements."
|
_err_exit $? "The pip program failed to install InvokeAI's requirements."
|
||||||
|
|
||||||
pip install $INVOKE_AI_SRC
|
./.venv/bin/python -mpip install $INVOKE_AI_SRC
|
||||||
_err_exit $? "The pip program failed to install InvokeAI."
|
_err_exit $? "The pip program failed to install InvokeAI."
|
||||||
|
|
||||||
python .venv/bin/configure_invoke.py
|
./.venv/bin/python .venv/bin/configure_invokeai.py --root .
|
||||||
_err_exit $? "The configure script failed to run successfully."
|
_err_exit $? "The configure script failed to run successfully."
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user