Skip to content

Commit d2f34d4

Browse files
committed
Fix docker build
1 parent 99ccc0b commit d2f34d4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

neurons/utils/pre_flight.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from execution_layer.circuit import ProofSystem
1818

1919
from functools import partial
20+
from collections import OrderedDict
2021

2122
LOCAL_SNARKJS_INSTALL_DIR = os.path.join(os.path.expanduser("~"), ".snarkjs")
2223
LOCAL_SNARKJS_PATH = os.path.join(
@@ -55,21 +56,21 @@ def run_shared_preflight_checks(role: Optional[Roles] = None):
5556
Exception: If any of the pre-flight checks fail.
5657
"""
5758

58-
preflight_checks = [
59-
("Syncing model files", partial(sync_model_files, role=role)),
60-
("Ensuring Node.js version", ensure_nodejs_version),
61-
("Checking SnarkJS installation", ensure_snarkjs_installed),
62-
("Checking EZKL installation", ensure_ezkl_installed),
63-
]
59+
preflight_checks = OrderedDict({
60+
"Syncing model files": partial(sync_model_files, role=role),
61+
"Ensuring Node.js version": ensure_nodejs_version,
62+
"Checking SnarkJS installation": ensure_snarkjs_installed,
63+
"Checking EZKL installation": ensure_ezkl_installed,
64+
})
6465

6566
bt.logging.info(" PreFlight | Running pre-flight checks")
6667

6768
# Skip sync_model_files during docker build
6869
if os.getenv("OMRON_DOCKER_BUILD", False):
6970
bt.logging.info(" PreFlight | Skipping model file sync")
70-
preflight_checks.remove(("Syncing model files", sync_model_files))
71+
_ = preflight_checks.pop("Syncing model files")
7172

72-
for check_name, check_function in preflight_checks:
73+
for check_name, check_function in preflight_checks.items():
7374
bt.logging.info(f" PreFlight | {check_name}")
7475
try:
7576
check_function()

0 commit comments

Comments
 (0)