asteroid8898/NBOX-test2
0
1import subprocess2import os3import torch4 5if torch.cuda.is_available():6 device = "cuda"7 print("Using GPU")8else:9 device = "cpu"10 print("Using CPU")11 12# Clone the repository13subprocess.run(["git", "clone", "https://github.com/AiAsteroid/NBOX.git", "--single-branch"], check=True)14os.chdir("NBOX")15 16# Install dependencies17onnx_provider = "cuda-12.2" if device == "cuda" else "default"18subprocess.run(["python", "install.py", "--onnxruntime", onnx_provider, "--skip-conda"], check=True)19 20# Check if installation was successful by listing installed packages21subprocess.run(["pip", "list"], check=True)22 23print("DID WE GET TO THE START?????")24 25# Run the UI26subprocess.run(["python", "run.py", "--execution-providers", device])27 28print("DID WE GET TO THE END?????")29 30subprocess.run(["cat", "ERROR.log"], check=True)31 