BBrother commited on
Commit
ce09e6a
1 Parent(s): 642ad73

Update SW_run.py

Browse files
Files changed (1) hide show
  1. SW_run.py +4 -1
SW_run.py CHANGED
@@ -22,10 +22,13 @@ logging.getLogger().addHandler(console_handler)
22
  sys.stdout = logging.getLogger().handlers[0].stream
23
  sys.stderr = logging.getLogger().handlers[0].stream
24
 
 
 
 
25
  try:
26
  # 在try块中运行/bushu/ui/launch.py,并将输出重定向到日志文件
27
  with open(log_file, 'a') as log_file_handle:
28
- subprocess.run(['python', '/bushu/ui/launch.py', '--skip-torch-cuda-test'], check=True, stdout=log_file_handle, stderr=subprocess.STDOUT)
29
 
30
  except subprocess.CalledProcessError as e:
31
  # 捕获异常并记录到日志文件
 
22
  sys.stdout = logging.getLogger().handlers[0].stream
23
  sys.stderr = logging.getLogger().handlers[0].stream
24
 
25
+ # 更改当前工作目录为/bushu/ui
26
+ os.chdir('/bushu/ui')
27
+
28
  try:
29
  # 在try块中运行/bushu/ui/launch.py,并将输出重定向到日志文件
30
  with open(log_file, 'a') as log_file_handle:
31
+ subprocess.run(['python', '/bushu/ui/launch.py', '--skip-torch-cuda-test', '--share', '--listen', '--xformers', '--enable-insecure-extension-access', '--gradio-queue', '--multiple'], check=True, stdout=log_file_handle, stderr=subprocess.STDOUT)
32
 
33
  except subprocess.CalledProcessError as e:
34
  # 捕获异常并记录到日志文件