MCPcopy Create free account
hub / github.com/apache/tvm / check_arm_qemu

Function check_arm_qemu

tests/scripts/ci.py:449–472  ·  view source on GitHub ↗

Check if a machine is ready to run an ARM Docker image

()

Source from the content-addressed store, hash-verified

447
448
449def check_arm_qemu() -> None:
450 """
451 Check if a machine is ready to run an ARM Docker image
452 """
453 machine = platform.machine().lower()
454 if "arm" in machine or "aarch64" in machine:
455 # No need to check anything if the machine runs ARM
456 return
457
458 binfmt = Path("/proc/sys/fs/binfmt_misc")
459 if not binfmt.exists() or len(list(binfmt.glob("qemu-*"))) == 0:
460 clean_exit(
461 textwrap.dedent(
462 """
463 You must run a one-time setup to use ARM containers on x86 via QEMU:
464
465 sudo apt install -y qemu binfmt-support qemu-user-static
466 docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
467
468 See https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/ for details""".strip(
469 "\n"
470 )
471 )
472 )
473
474
475def cli_name(s: str) -> str:

Callers

nothing calls this directly

Calls 1

clean_exitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…