Spaces:
Sleeping
Sleeping
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() | |