Spaces:
Running
Running
File size: 583 Bytes
74514eb 3118e10 b5eaaf5 1b2accb 74514eb 3c28238 1b2accb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import subprocess
import logging
import sys
import os
from .app2 import entry
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
if __name__ == "__main__":
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"')
entry()
|