Kizi-Art commited on
Commit
d9454d2
1 Parent(s): 1607f52

Upload launch.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. launch.py +48 -0
launch.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from modules import launch_utils
2
+
3
+ args = launch_utils.args
4
+ python = launch_utils.python
5
+ git = launch_utils.git
6
+ index_url = launch_utils.index_url
7
+ dir_repos = launch_utils.dir_repos
8
+
9
+ commit_hash = launch_utils.commit_hash
10
+ git_tag = launch_utils.git_tag
11
+
12
+ run = launch_utils.run
13
+ is_installed = launch_utils.is_installed
14
+ repo_dir = launch_utils.repo_dir
15
+
16
+ run_pip = launch_utils.run_pip
17
+ check_run_python = launch_utils.check_run_python
18
+ git_clone = launch_utils.git_clone
19
+ git_pull_recursive = launch_utils.git_pull_recursive
20
+ list_extensions = launch_utils.list_extensions
21
+ run_extension_installer = launch_utils.run_extension_installer
22
+ prepare_environment = launch_utils.prepare_environment
23
+ configure_for_tests = launch_utils.configure_for_tests
24
+ start = launch_utils.start
25
+
26
+
27
+ def main():
28
+ if args.dump_sysinfo:
29
+ filename = launch_utils.dump_sysinfo()
30
+
31
+ print(f"Sysinfo saved as {filename}. Exiting...")
32
+
33
+ exit(0)
34
+
35
+ launch_utils.startup_timer.record("initial startup")
36
+
37
+ with launch_utils.startup_timer.subcategory("prepare environment"):
38
+ if not args.skip_prepare_environment:
39
+ prepare_environment()
40
+
41
+ if args.test_server:
42
+ configure_for_tests()
43
+
44
+ start()
45
+
46
+
47
+ if __name__ == "__main__":
48
+ main()