in src/braket_container.py [0:0]
def run_customer_code() -> None:
"""
Downloads and runs the customer code. If the customer code exists
with a non-zero exit code, this function will log a failure and
exit.
"""
s3_uri, entry_point, compression_type = get_code_setup_parameters()
local_s3_file = download_customer_code(s3_uri)
unpack_code_and_add_to_path(local_s3_file, compression_type)
if entry_point.find(":") >= 0:
exit_code = run_customer_code_as_process(entry_point)
else:
exit_code = run_customer_code_as_subprocess(entry_point)
if exit_code != 0:
log_failure_and_exit(f"Job at {entry_point} exited with exit code: {exit_code}")