Skip to content

Commit

Permalink
add default DCGM for older container versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkyang-nvi committed Jul 22, 2021
1 parent 12b78b9 commit da3c92e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,13 @@ def create_argmap(images):

vars = p_version.stdout
dcgm_ver = re.search("DCGM_VERSION=([\S]{4,}) ", vars)
dcgm_version = "" if dcgm_ver == None else dcgm_ver.group(1)
dcgm_version = ""
if dcgm_ver == None:
dcgm_version = "2.2.3"
log("WARNING: DCGM version not found from image, installing the earlierst version {}"
.format(dcgm_version))
else:
dcgm_version = dcgm_ver.group(1)
fail_if(
len(dcgm_version) == 0,
'docker inspect to find DCGM version failed, {}'.format(vars))
Expand Down

0 comments on commit da3c92e

Please sign in to comment.