File size: 822 Bytes
ac2d473
 
 
 
54dc9a8
06608a9
54dc9a8
 
06608a9
54dc9a8
ac2d473
 
da4ac9b
ac2d473
 
06608a9
e2203c5
 
ac2d473
e2203c5
 
ac2d473
782e2ed
 
06608a9
91bcb53
0ea5242
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import subprocess
import os
import torch

if torch.cuda.is_available():
    device = "cuda"
    print("Using GPU")
else:
    device = "cpu"
    print("Using CPU")

# Clone the repository
subprocess.run(["git", "clone", "https://github.com/AiAsteroid/NBOX.git", "--single-branch"], check=True)
os.chdir("NBOX")

# Install dependencies
onnx_provider = "cuda-12.2" if device == "cuda" else "default"
subprocess.run(["python", "install.py", "--onnxruntime", onnx_provider, "--skip-conda"], check=True)

# Check if installation was successful by listing installed packages
subprocess.run(["pip", "list"], check=True)

print("DID WE GET TO THE START?????")

# Run the UI
subprocess.run(["python", "run.py", "--execution-providers", device])

print("DID WE GET TO THE END?????")

subprocess.run(["cat", "ERROR.log"], check=True)