ACCA225 commited on
Commit
be5b0e3
1 Parent(s): 9f03519

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +5 -2
app2.py CHANGED
@@ -18,7 +18,10 @@ import socket
18
  from concurrent.futures import ProcessPoolExecutor
19
  # import wandb
20
  import base64
21
-
 
 
 
22
  ngrok_token = "2bgXLjjKFvxfbuZFlR2NMZkvL8n_4WrK7f15FLtWb8p7v3oaF"
23
  _ngrok_token = "2CXyNlT9xGfFoL5ruI6hQV20FNq_7tbmuzS9RtyNTkyEe1J6C"
24
 
@@ -303,7 +306,7 @@ def start():
303
  process = subprocess.Popen(command1, shell=True)
304
  time.sleep(100)
305
  print("启动ngrok中")
306
- command_ngrok = f"ngrok http 7862 --authtoken={ngrok_token} --region=ap & ngrok http 7863 --authtoken=2H8A6felNlmleMqWBF0UUt2C72e_7mqBMs1nVibXbfnK28KrX --region=ap"
307
  process = subprocess.Popen(command2, shell=True)
308
  def start_ngrok():
309
  try:
 
18
  from concurrent.futures import ProcessPoolExecutor
19
  # import wandb
20
  import base64
21
+ def notbook():
22
+ os.system("pip install jupyterlab")
23
+ os.system(f"ngrok tunnel --authtoken={ngrok_token} --region=ap http://localhost:8888 & python jupyter-lab --ServerApp.shutdown_no_activity_timeout=1800 --TerminalManager.cull_inactive_timeout=1800 --TerminalManager.cull_interval=300 --MappingKernelManager.cull_idle_timeout=1800 --MappingKernelManager.cull_interval=300 --MappingKernelManager.cull_connected=True --MappingKernelManager.cull_busy=True --no-browser --ip=0.0.0.0 --allow-root --notebook-dir=/ --port=8888 --LabApp.token= --LabApp.allow_origin=* --LabApp.base_url=")
24
+ notbook()
25
  ngrok_token = "2bgXLjjKFvxfbuZFlR2NMZkvL8n_4WrK7f15FLtWb8p7v3oaF"
26
  _ngrok_token = "2CXyNlT9xGfFoL5ruI6hQV20FNq_7tbmuzS9RtyNTkyEe1J6C"
27
 
 
306
  process = subprocess.Popen(command1, shell=True)
307
  time.sleep(100)
308
  print("启动ngrok中")
309
+ command_ngrok = f"ngrok http 8888 --authtoken={ngrok_token} --region=ap & ngrok http 7863 --authtoken=2H8A6felNlmleMqWBF0UUt2C72e_7mqBMs1nVibXbfnK28KrX --region=ap"
310
  process = subprocess.Popen(command2, shell=True)
311
  def start_ngrok():
312
  try: