Spaces:
Sleeping
Sleeping
File size: 532 Bytes
74514eb 3118e10 b5eaaf5 74514eb 3c28238 b5eaaf5 3c28238 9140fd8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import subprocess
import logging
import sys
import os
def run(cmd):
result = subprocess.run(cmd, shell=True, capture_output=True, env=None)
if result.returncode != 0:
logging.error(
f"Command '{cmd}' failed with exit status code '{result.returncode}'. Exiting..."
)
sys.exit()
return result
os.chdir(os.path.abspath(os.path.dirname(__file__)))
run('export LD_LIBRARY_PATH="/usr/lib/wsl/lib/"')
run('export NUMBA_CUDA_DRIVER="/usr/lib/wsl/lib/libcuda.so.1"')
run('python ./app2.py')
|