Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import subprocess
|
2 |
import logging
|
3 |
import sys
|
|
|
4 |
|
5 |
def run(cmd):
|
6 |
result = subprocess.run(cmd, shell=True, capture_output=True, env=None)
|
@@ -11,6 +12,7 @@ def run(cmd):
|
|
11 |
sys.exit()
|
12 |
return result
|
13 |
|
|
|
14 |
run('export LD_LIBRARY_PATH="/usr/lib/wsl/lib/"')
|
15 |
run('export NUMBA_CUDA_DRIVER="/usr/lib/wsl/lib/libcuda.so.1"')
|
16 |
run('python ./app2.py')
|
|
|
1 |
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 |
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')
|