Yaron Koresh commited on
Commit
3c28238
·
verified ·
1 Parent(s): ea25a06

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def run(cmd):
2
+ result = subprocess.run(cmd, shell=True, capture_output=True, env=None)
3
+ if result.returncode != 0:
4
+ logging.error(
5
+ f"Command '{cmd}' failed with exit status code '{result.returncode}'. Exiting..."
6
+ )
7
+ sys.exit()
8
+ return result
9
+
10
+ run('export LD_LIBRARY_PATH="/usr/lib/wsl/lib/"')
11
+ run('export NUMBA_CUDA_DRIVER="/usr/lib/wsl/lib/libcuda.so.1"')
12
+ run('python app2.py')