Yaron Koresh commited on
Commit
1b2accb
·
verified ·
1 Parent(s): 5930a22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -2,6 +2,7 @@ import subprocess
2
  import logging
3
  import sys
4
  import os
 
5
 
6
  def run(cmd):
7
  result = subprocess.run(cmd, shell=True, capture_output=True, env=None)
@@ -12,7 +13,8 @@ def run(cmd):
12
  sys.exit()
13
  return result
14
 
15
- os.chdir(os.path.abspath(os.path.dirname(__file__)))
16
- run('export LD_LIBRARY_PATH="/usr/lib/wsl/lib/"')
17
- run('export NUMBA_CUDA_DRIVER="/usr/lib/wsl/lib/libcuda.so.1"')
18
- run('python ./app2.py')
 
 
2
  import logging
3
  import sys
4
  import os
5
+ from .app2 import entry
6
 
7
  def run(cmd):
8
  result = subprocess.run(cmd, shell=True, capture_output=True, env=None)
 
13
  sys.exit()
14
  return result
15
 
16
+ if __name__ == "__main__":
17
+ os.chdir(os.path.abspath(os.path.dirname(__file__)))
18
+ run('export LD_LIBRARY_PATH="/usr/lib/wsl/lib/"')
19
+ run('export NUMBA_CUDA_DRIVER="/usr/lib/wsl/lib/libcuda.so.1"')
20
+ entry()