MCPcopy Create free account
hub / github.com/microsoft/BitNet / run_command

Function run_command

run_inference.py:8–14  ·  view source on GitHub ↗

Run a system command and ensure it succeeds.

(command, shell=False)

Source from the content-addressed store, hash-verified

6import subprocess
7
8def 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
16def run_inference():
17 build_dir = "build"

Callers 1

run_inferenceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected