Run a system command and ensure it succeeds.
(command, shell=False)
| 6 | import subprocess |
| 7 | |
| 8 | def run_command(command, shell=False): |
| 9 | """Run a system command and ensure it succeeds.""" |
| 10 | try: |
| 11 | subprocess.run(command, shell=shell, check=True) |
| 12 | except subprocess.CalledProcessError as e: |
| 13 | print(f"Error occurred while running command: {e}") |
| 14 | sys.exit(1) |
| 15 | |
| 16 | def run_inference(): |
| 17 | build_dir = "build" |