Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -22,25 +22,6 @@ formatter = logging.Formatter('\n >>> [%(levelname)s] %(asctime)s %(name)s: %(me
|
|
22 |
handler2.setFormatter(formatter)
|
23 |
root.addHandler(handler2)
|
24 |
|
25 |
-
def run(cmd, assert_success=False, capture_output=False, env=None, dry_run=False):
|
26 |
-
if dry_run:
|
27 |
-
print(f"--> {cmd}")
|
28 |
-
result = 1
|
29 |
-
else:
|
30 |
-
result = subprocess.run(cmd, shell=True, capture_output=capture_output, env=env)
|
31 |
-
if assert_success and result.returncode != 0:
|
32 |
-
logging.error(
|
33 |
-
f"Command '{cmd}' failed with exit status code '{result.returncode}'. Exiting..."
|
34 |
-
)
|
35 |
-
sys.exit()
|
36 |
-
|
37 |
-
return result
|
38 |
-
|
39 |
-
run("apt update")
|
40 |
-
run("apt --fix-broken install")
|
41 |
-
run("apt install mpich libopenmpi-dev")
|
42 |
-
run("python -m pip install --upgrade pip")
|
43 |
-
|
44 |
last_motion=None
|
45 |
dtype = torch.float16
|
46 |
result=[]
|
@@ -102,6 +83,21 @@ function custom(){
|
|
102 |
}
|
103 |
"""
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
@njit(cache=True,nopython=True,parallel=True)
|
106 |
def deps():
|
107 |
try:
|
|
|
22 |
handler2.setFormatter(formatter)
|
23 |
root.addHandler(handler2)
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
last_motion=None
|
26 |
dtype = torch.float16
|
27 |
result=[]
|
|
|
83 |
}
|
84 |
"""
|
85 |
|
86 |
+
@njit(cache=True,nopython=True,parallel=True)
|
87 |
+
def run(cmd, assert_success=False, capture_output=False, env=None, dry_run=False):
|
88 |
+
if dry_run:
|
89 |
+
print(f"--> {cmd}")
|
90 |
+
result = 1
|
91 |
+
else:
|
92 |
+
result = subprocess.run(cmd, shell=True, capture_output=capture_output, env=env)
|
93 |
+
if assert_success and result.returncode != 0:
|
94 |
+
logging.error(
|
95 |
+
f"Command '{cmd}' failed with exit status code '{result.returncode}'. Exiting..."
|
96 |
+
)
|
97 |
+
sys.exit()
|
98 |
+
|
99 |
+
return result
|
100 |
+
|
101 |
@njit(cache=True,nopython=True,parallel=True)
|
102 |
def deps():
|
103 |
try:
|