Skip to content

Commit

Permalink
Merge pull request GATEOverflow#59 from arjunsuresh/mlperf-inference
Browse files Browse the repository at this point in the history
Cleanups
  • Loading branch information
arjunsuresh authored Jun 8, 2024
2 parents 176661f + 32ea794 commit 834f4f8
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
11 changes: 11 additions & 0 deletions script/download-file/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
"deps": [
{
"tags": "detect,os"
},
{
"tags": "get,generic-sys-util,_md5sha1sum",
"enable_if_env": {
"CM_HOST_OS_FLAVOR": [
"macos"
],
"CM_DOWNLOAD_CHECKSUM": [
"on"
]
}
}
],
"default_env": {
Expand Down
2 changes: 1 addition & 1 deletion script/download-file/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def preprocess(i):
#verify checksum if file already present
if env.get('CM_DOWNLOAD_CHECKSUM', '') != '':
x='*' if os_info['platform'] == 'windows' else ''
env['CM_DOWNLOAD_CHECKSUM_CMD'] = "echo {} {}{}{}{} | md5sum -c".format(env.get('CM_DOWNLOAD_CHECKSUM'), x, q, env['CM_DOWNLOAD_FILENAME'], q)
env['CM_DOWNLOAD_CHECKSUM_CMD'] = "echo {} {}{}{}{} | md5sum -cs ".format(env.get('CM_DOWNLOAD_CHECKSUM'), x, q, env['CM_DOWNLOAD_FILENAME'], q)
else:
env['CM_DOWNLOAD_CHECKSUM_CMD'] = ""

Expand Down
1 change: 1 addition & 0 deletions script/download-file/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if [[ ${require_download} == "1" ]]; then
echo ""
echo "${CM_DOWNLOAD_CHECKSUM_CMD}"
eval "${CM_DOWNLOAD_CHECKSUM_CMD}"
test $? -eq 0 || exit $?
fi
fi

Expand Down
16 changes: 16 additions & 0 deletions script/extract-file/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
"deps": [
{
"tags": "detect,os"
},
{
"tags": "get,generic-sys-util,_md5sha1sum",
"enable_if_env": {
"CM_HOST_OS_FLAVOR": [
"macos"
]
},
"skip_if_any_env": {
"CM_EXTRACT_EXTRACTED_CHECKSUM_FILE": [
"off"
],
"CM_EXTRACT_EXTRACTED_CHECKSUM": [
"off"
]
}
}
],
"input_description": {},
Expand Down
11 changes: 11 additions & 0 deletions script/get-generic-sys-util/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,17 @@
"dnf": "nlohmann-json-dev"
}
}
},
"md5sha1sum": {
"env": {
"CM_SYS_UTIL_NAME": "md5sha1sum"
},
"state": {
"md5sha1sum": {
"apt": "",
"brew": "md5sha1sum"
}
}
}
}
}

0 comments on commit 834f4f8

Please sign in to comment.