mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 10:02:28 +08:00
colab-dependencies.py script patch
This commit is contained in:
parent
e19f1433ea
commit
59f2f9b692
@ -12,7 +12,7 @@ def get_enabled_subdirectories_with_files(base_directory):
|
|||||||
requirements_file = os.path.join(full_path, "requirements.txt")
|
requirements_file = os.path.join(full_path, "requirements.txt")
|
||||||
install_script = os.path.join(full_path, "install.py")
|
install_script = os.path.join(full_path, "install.py")
|
||||||
|
|
||||||
if os.path.isfile(requirements_file) and os.path.isfile(install_script):
|
if os.path.exists(requirements_file) or os.path.exists(install_script):
|
||||||
subdirs_with_files.append((full_path, requirements_file, install_script))
|
subdirs_with_files.append((full_path, requirements_file, install_script))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"EXCEPTION During Dependencies INSTALL on '{subdir}':\n{e}")
|
print(f"EXCEPTION During Dependencies INSTALL on '{subdir}':\n{e}")
|
||||||
@ -21,10 +21,12 @@ def get_enabled_subdirectories_with_files(base_directory):
|
|||||||
|
|
||||||
|
|
||||||
def install_requirements(requirements_file_path):
|
def install_requirements(requirements_file_path):
|
||||||
|
if os.path.exists(requirements_file_path):
|
||||||
subprocess.run(["pip", "install", "-r", requirements_file_path])
|
subprocess.run(["pip", "install", "-r", requirements_file_path])
|
||||||
|
|
||||||
|
|
||||||
def run_install_script(install_script_path):
|
def run_install_script(install_script_path):
|
||||||
|
if os.path.exists(install_script_path):
|
||||||
subprocess.run(["python", install_script_path])
|
subprocess.run(["python", install_script_path])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user