run_local_modelverse.py 711 B

12345678910111213141516
  1. import subprocess
  2. import sys
  3. # sys.executable to use the same Python interpreter used to invoke this command
  4. if len(sys.argv) < 2:
  5. port = "8001"
  6. else:
  7. port = sys.argv[1]
  8. subprocess.check_call([sys.executable, "-m", "sccd.compiler.sccdc", "-p", "threads", "server.xml"], cwd="hybrid_server")
  9. subprocess.call([sys.executable, "run_mvk_server.py", port], cwd="hybrid_server")
  10. # Additional ways of calling...
  11. #subprocess.call([sys.executable, "run_mvk_server.py", port] + ["--kernel=baseline-jit"], cwd="hybrid_server")
  12. #subprocess.call([sys.executable, "-m", "cProfile", "-s", "tottime", "run_mvk_server.py", port], cwd="hybrid_server", stdout=open("/tmp/stdout", 'w'), stderr=open("/tmp/stderr", "w"))