From 34d435714f11ddb19973518ae6fd2eea69d59578 Mon Sep 17 00:00:00 2001 From: allegroai Date: Fri, 14 May 2021 01:30:16 +0300 Subject: [PATCH] Improve error handling on missing tritonserver executable --- clearml_serving/triton_helper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clearml_serving/triton_helper.py b/clearml_serving/triton_helper.py index 8428d94..c878541 100644 --- a/clearml_serving/triton_helper.py +++ b/clearml_serving/triton_helper.py @@ -114,7 +114,12 @@ def maintenance_daemon( cmd.append('--{}={}'.format(k, v)) print('Starting server: {}'.format(cmd)) - proc = subprocess.Popen(cmd) + try: + proc = subprocess.Popen(cmd) + except FileNotFoundError: + raise ValueError( + "Triton Server Engine (tritonserver) could not be found!\n" + "Verify you running inside the `nvcr.io/nvidia/tritonserver` docker container") base_freq = min(update_frequency_sec, metric_frequency_sec) metric_tic = update_tic = time() while True: