From 32b1e974ca216e5cd2e82235db8ccc7420f6e85a Mon Sep 17 00:00:00 2001 From: Eugene Brodsky Date: Mon, 29 Jan 2024 00:58:32 -0500 Subject: [PATCH] feat(installer): install from PyPi instead of using prepackaged wheel --- installer/lib/installer.py | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/installer/lib/installer.py b/installer/lib/installer.py index de48094b3e..84ac6d6cd6 100644 --- a/installer/lib/installer.py +++ b/installer/lib/installer.py @@ -21,10 +21,6 @@ OS = platform.uname().system ARCH = platform.uname().machine VERSION = "latest" -# Install the wheel packaged with the installer -FF_USE_LOCAL_WHEEL = True - - class Installer: """ Deploys an InvokeAI installation into a given path @@ -265,27 +261,7 @@ class InvokeAiInstance: version = self.version pre = None - ## TODO: only local wheel will be installed as of now; support for --version arg is TODO - if FF_USE_LOCAL_WHEEL: - # if no wheel, try to do a source install before giving up - try: - src = str(next(Path(__file__).parent.glob("InvokeAI-*.whl"))) - except StopIteration: - try: - src = Path(__file__).parents[1].expanduser().resolve() - # if the above directory contains one of these files, we'll do a source install - next(src.glob("pyproject.toml")) - next(src.glob("invokeai")) - except StopIteration: - print("Unable to find a wheel or perform a source install. Giving up.") - src = "" - - elif version == "source": - # this makes an assumption about the location of the installer package in the source tree - src = Path(__file__).parents[1].expanduser().resolve() - else: - # will install from PyPi - src = f"invokeai=={version}" if version is not None else "invokeai" + src = f"invokeai=={version}" if version is not None else "invokeai" from plumbum import FG, local # type: ignore