2023-07-21 17:15:44 +08:00
|
|
|
from modules import launch_utils
|
2023-05-21 21:27:23 +08:00
|
|
|
|
|
|
|
args = launch_utils.args
|
|
|
|
python = launch_utils.python
|
|
|
|
git = launch_utils.git
|
|
|
|
index_url = launch_utils.index_url
|
|
|
|
dir_repos = launch_utils.dir_repos
|
|
|
|
|
|
|
|
commit_hash = launch_utils.commit_hash
|
|
|
|
git_tag = launch_utils.git_tag
|
|
|
|
|
|
|
|
run = launch_utils.run
|
|
|
|
is_installed = launch_utils.is_installed
|
|
|
|
repo_dir = launch_utils.repo_dir
|
|
|
|
|
|
|
|
run_pip = launch_utils.run_pip
|
|
|
|
check_run_python = launch_utils.check_run_python
|
|
|
|
git_clone = launch_utils.git_clone
|
|
|
|
git_pull_recursive = launch_utils.git_pull_recursive
|
2023-07-19 01:11:30 +08:00
|
|
|
list_extensions = launch_utils.list_extensions
|
2023-05-21 21:27:23 +08:00
|
|
|
run_extension_installer = launch_utils.run_extension_installer
|
|
|
|
prepare_environment = launch_utils.prepare_environment
|
|
|
|
configure_for_tests = launch_utils.configure_for_tests
|
|
|
|
start = launch_utils.start
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2023-08-31 00:48:47 +08:00
|
|
|
if args.dump_sysinfo:
|
|
|
|
filename = launch_utils.dump_sysinfo()
|
|
|
|
|
|
|
|
print(f"Sysinfo saved as {filename}. Exiting...")
|
|
|
|
|
|
|
|
exit(0)
|
|
|
|
|
2023-07-22 18:49:29 +08:00
|
|
|
launch_utils.startup_timer.record("initial startup")
|
2023-07-18 19:00:16 +08:00
|
|
|
|
2023-07-22 18:49:29 +08:00
|
|
|
with launch_utils.startup_timer.subcategory("prepare environment"):
|
|
|
|
if not args.skip_prepare_environment:
|
|
|
|
prepare_environment()
|
2023-05-21 21:27:23 +08:00
|
|
|
|
|
|
|
if args.test_server:
|
|
|
|
configure_for_tests()
|
|
|
|
|
|
|
|
start()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|