mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(installer): upgrade the temporary pip before installation
This commit is contained in:
parent
60eea09629
commit
d397beaa47
@ -21,6 +21,7 @@ OS = platform.uname().system
|
|||||||
ARCH = platform.uname().machine
|
ARCH = platform.uname().machine
|
||||||
VERSION = "latest"
|
VERSION = "latest"
|
||||||
|
|
||||||
|
|
||||||
class Installer:
|
class Installer:
|
||||||
"""
|
"""
|
||||||
Deploys an InvokeAI installation into a given path
|
Deploys an InvokeAI installation into a given path
|
||||||
@ -59,9 +60,6 @@ class Installer:
|
|||||||
def bootstrap(self, verbose: bool = False) -> TemporaryDirectory | None:
|
def bootstrap(self, verbose: bool = False) -> TemporaryDirectory | None:
|
||||||
"""
|
"""
|
||||||
Bootstrap the installer venv with packages required at install time
|
Bootstrap the installer venv with packages required at install time
|
||||||
|
|
||||||
:return: path to the virtual environment directory that was bootstrapped
|
|
||||||
:rtype: TemporaryDirectory
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
print("Initializing the installer. This may take a minute - please wait...")
|
print("Initializing the installer. This may take a minute - please wait...")
|
||||||
@ -73,9 +71,17 @@ class Installer:
|
|||||||
cmd.extend(self.reqs)
|
cmd.extend(self.reqs)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
res = subprocess.check_output(cmd).decode()
|
# upgrade pip to the latest version to avoid a confusing message
|
||||||
|
res = subprocess.check_output([pip, "install", "--upgrade", "pip"]).decode()
|
||||||
if verbose:
|
if verbose:
|
||||||
print(res)
|
print(res)
|
||||||
|
|
||||||
|
# run the install prerequisites installation
|
||||||
|
res = subprocess.check_output(cmd).decode()
|
||||||
|
|
||||||
|
if verbose:
|
||||||
|
print(res)
|
||||||
|
|
||||||
return venv_dir
|
return venv_dir
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user