From b25d0e8cc8b41ae993c30d3687a78adde54b41bb Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Mon, 24 May 2021 17:20:21 +0200 Subject: [PATCH] * added module "docker.template" to support adaptive CK containers * added rebuild function to module:docker to rebuild images (#145) * added support for multiple Docker tags in module:docker See example: https://github.com/octoml/mlops/tree/main/docker/ck-template-mlperf * added "default_org" key in Docker image to specify default organization * added "outdated" and "aging" keys in Docker images to warn user about a status of a given Docker image * added main CK and MLPerf repositories to Zenodo to ensure reproducibilty * added common function "tested" to mark CK entries as tested, i.e. "ck tested docker:mlperf-inference-v0.7.openvino" --- CHANGES.txt | 16 ++- README.md | 1 + ck/kernel.py | 82 ++++++++++++- ck/repo/module/.cm/alias-a-docker.template | 1 + ck/repo/module/.cm/alias-u-619e141969aa4bad | 1 + ck/repo/module/docker.template/.cm/desc.json | 1 + ck/repo/module/docker.template/.cm/info.json | 20 +++ ck/repo/module/docker.template/.cm/meta.json | 9 ++ ck/repo/module/docker.template/module.py | 32 +++++ ck/repo/module/docker/.cm/meta.json | 3 + ck/repo/module/docker/.cm/updates.json | 14 +++ ck/repo/module/docker/module.py | 115 +++++++++++++++++- ...-x86-64-docker-external-imagenet-start.bat | 2 +- ...n-x86-64-docker-external-imagenet-start.sh | 2 +- ...age-classification-x86-64-docker-start.bat | 2 +- ...mage-classification-x86-64-docker-start.sh | 2 +- .../ck-image-classification-x86-64-docker.md | 8 +- ...k-object-detection-x86-64-docker-start.bat | 2 +- ...ck-object-detection-x86-64-docker-start.sh | 2 +- .../ck-object-detection-x86-64-docker.md | 10 +- .../tasks/task-object-detection.md | 6 +- 21 files changed, 305 insertions(+), 26 deletions(-) create mode 100644 ck/repo/module/.cm/alias-a-docker.template create mode 100644 ck/repo/module/.cm/alias-u-619e141969aa4bad create mode 100644 ck/repo/module/docker.template/.cm/desc.json create mode 100644 ck/repo/module/docker.template/.cm/info.json create mode 100644 ck/repo/module/docker.template/.cm/meta.json create mode 100644 ck/repo/module/docker.template/module.py diff --git a/CHANGES.txt b/CHANGES.txt index 7aeb0015d8..a5b44e0eb7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,18 @@ -* V2.2.0.1 +* V2.4.0 + * added module "docker.template" to support adaptive CK containers + * added rebuild function to module:docker to rebuild images (#145) + * added support for multiple Docker tags in module:docker + See example: https://github.com/octoml/mlops/tree/main/docker/ck-template-mlperf + * added "default_org" key in Docker image to specify default organization + * added "outdated" and "aging" keys in Docker images to warn user + about a status of a given Docker image + * added main CK and MLPerf repositories to Zenodo + to ensure reproducibilty + * added common function "tested" to mark CK entries as tested, + i.e. "ck tested docker:mlperf-inference-v0.7.openvino" + +* V2.3.0 + * improved "ck search" to search tags in entries with inheritance * fixed function "ck status" * V2.2.0 diff --git a/README.md b/README.md index 6a333805d8..2a2174a314 100755 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Linux/MacOS: [![Build Status](https://travis-ci.org/ctuning/ck.svg?branch=master)](https://travis-ci.org/ctuning/ck) Windows: [![Windows Build status](https://ci.appveyor.com/api/projects/status/iw2k4eajy54xrvqc?svg=true)](https://ci.appveyor.com/project/gfursin/ck) +[![DOI](https://zenodo.org/badge/26230485.svg)](https://zenodo.org/badge/latestdoi/26230485) [![Documentation Status](https://readthedocs.org/projects/ck/badge/?version=latest)](https://ck.readthedocs.io/en/latest/?badge=latest) [![Coverage Status](https://coveralls.io/repos/github/ctuning/ck/badge.svg)](https://coveralls.io/github/ctuning/ck) diff --git a/ck/kernel.py b/ck/kernel.py index b042223be4..e8b1e08cb2 100755 --- a/ck/kernel.py +++ b/ck/kernel.py @@ -28,7 +28,7 @@ # We use 3 digits for the main (released) version and 4th digit for development revision -__version__ = "2.3.0" +__version__ = "2.4.0" # Do not use characters (to detect outdated version)! # Import packages that are global for the whole kernel @@ -300,6 +300,8 @@ "download": {"desc": " attempt to download entry from remote host (experimental)", "for_web": "yes"}, + "tested": {"desc": " mark CK component as tested", "for_web": "no"}, + "print_input": {"desc": "prints input"}, }, @@ -336,6 +338,7 @@ "delete_index", "get_api", "download", + "tested", "convert_cm_to_ck"] } @@ -3262,6 +3265,83 @@ def download(i): return {'return': 0} +############################################################################## +# Mark a given CK component as tested +# +# TARGET: end users + + +def tested(i): + """Mark a given CK component as tested + Target audience: end users + + Args: + (repo_uoa) (str): CK repo UOA + (module_uoa) (str): CK module UOA + (data_uoa) (str): CK data UOA + + (name) (str): name of a tester + (email) (str): email of a tester + + Returns: + return (int): return code = 0, if successful + > 0, if error + (error) (str): error text if return > 0 + + + """ + + o = i.get('out', '') + + ruoa = i.get('repo_uoa', '') + muoa = i.get('module_uoa', '') + duoa = i.get('data_uoa', '') + + name = i.get('name','') + if name == '': + name = cfg.get('default_developer', '') + + email = i.get('email','') + if email == '': + email = cfg.get('default_developer_email', '') + + # Load entry + r=access({'action':'load', + 'repo_uoa':ruoa, + 'module_uoa':muoa, + 'data_uoa':duoa}) + if r['return']>0: return r + + d=r['dict'] + + tested=d.get('tested',[]) + + pack={'name':name, + 'email':email} + + rdt = get_current_date_time({}) + pack['iso_datetime'] = rdt['iso_datetime'] + + tested.append(pack) + + d['tested'] = tested + + # Update entry + r=access({'action':'update', + 'repo_uoa':ruoa, + 'module_uoa':muoa, + 'data_uoa':duoa, + 'dict':d, + 'sort_keys':'yes', + 'ignore_update':'yes'}) + if r['return']>0: return r + + if o=='con': + out('Entry updated successfully!') + + return r + + ############################################################################## # Reload cache with meta-descriptions of all CK repos # diff --git a/ck/repo/module/.cm/alias-a-docker.template b/ck/repo/module/.cm/alias-a-docker.template new file mode 100644 index 0000000000..4731fefbaa --- /dev/null +++ b/ck/repo/module/.cm/alias-a-docker.template @@ -0,0 +1 @@ +619e141969aa4bad diff --git a/ck/repo/module/.cm/alias-u-619e141969aa4bad b/ck/repo/module/.cm/alias-u-619e141969aa4bad new file mode 100644 index 0000000000..c30b2a9c8a --- /dev/null +++ b/ck/repo/module/.cm/alias-u-619e141969aa4bad @@ -0,0 +1 @@ +docker.template diff --git a/ck/repo/module/docker.template/.cm/desc.json b/ck/repo/module/docker.template/.cm/desc.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/ck/repo/module/docker.template/.cm/desc.json @@ -0,0 +1 @@ +{} diff --git a/ck/repo/module/docker.template/.cm/info.json b/ck/repo/module/docker.template/.cm/info.json new file mode 100644 index 0000000000..e779c63ad8 --- /dev/null +++ b/ck/repo/module/docker.template/.cm/info.json @@ -0,0 +1,20 @@ +{ + "backup_data_uid": "619e141969aa4bad", + "backup_module_uid": "032630d041b4fd8a", + "backup_module_uoa": "module", + "control": { + "author": "Grigori Fursin", + "author_email": "Grigori.Fursin@cTuning.org", + "author_webpage": "http://fursin.net", + "copyright": "See CK COPYRIGHT.txt for copyright details", + "engine": "CK", + "iso_datetime": "2021-05-23T16:28:50.758788", + "license": "See CK LICENSE.txt for licensing details", + "version": [ + "2", + "2", + "0" + ] + }, + "data_name": "docker.template" +} diff --git a/ck/repo/module/docker.template/.cm/meta.json b/ck/repo/module/docker.template/.cm/meta.json new file mode 100644 index 0000000000..58856f1be0 --- /dev/null +++ b/ck/repo/module/docker.template/.cm/meta.json @@ -0,0 +1,9 @@ +{ + "actions": {}, + "copyright": "See CK COPYRIGHT.txt for copyright details", + "desc": "Docker template", + "developer": "Grigori Fursin", + "developer_email": "grigori@octoml.ai", + "developer_webpage": "http://fursin.net", + "license": "See CK LICENSE.txt for licensing details" +} diff --git a/ck/repo/module/docker.template/module.py b/ck/repo/module/docker.template/module.py new file mode 100644 index 0000000000..daead48434 --- /dev/null +++ b/ck/repo/module/docker.template/module.py @@ -0,0 +1,32 @@ +# +# Collective Knowledge (Docker template) +# +# See CK LICENSE.txt for licensing details +# See CK COPYRIGHT.txt for copyright details +## +# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net +# + +cfg = {} # Will be updated by CK (meta description of this module) +work = {} # Will be updated by CK (temporal data) +ck = None # Will be updated by CK (initialized CK kernel) + +# Local settings + +############################################################################## +# Initialize module + + +def init(i): + """ + + Input: {} + + Output: { + return - return code = 0, if successful + > 0, if error + (error) - error text if return > 0 + } + + """ + return {'return': 0} diff --git a/ck/repo/module/docker/.cm/meta.json b/ck/repo/module/docker/.cm/meta.json index 11668c6ee6..6c7b46b8a6 100644 --- a/ck/repo/module/docker/.cm/meta.json +++ b/ck/repo/module/docker/.cm/meta.json @@ -12,6 +12,9 @@ "push": { "desc": "push a given image to the Docker Hub" }, + "rebuild": { + "desc": "rebuild a given container" + }, "run": { "desc": "run Docker image" }, diff --git a/ck/repo/module/docker/.cm/updates.json b/ck/repo/module/docker/.cm/updates.json index 915f803fba..83a01dfa32 100644 --- a/ck/repo/module/docker/.cm/updates.json +++ b/ck/repo/module/docker/.cm/updates.json @@ -75,6 +75,20 @@ "4", "1" ] + }, + { + "author": "Grigori Fursin", + "author_email": "Grigori.Fursin@cTuning.org", + "author_webpage": "http://fursin.net", + "copyright": "See CK COPYRIGHT.txt for copyright details", + "engine": "CK", + "iso_datetime": "2021-05-24T09:03:30.724920", + "license": "See CK LICENSE.txt for licensing details", + "version": [ + "2", + "2", + "0" + ] } ] } diff --git a/ck/repo/module/docker/module.py b/ck/repo/module/docker/module.py index dd43be9a69..1b5bf72187 100644 --- a/ck/repo/module/docker/module.py +++ b/ck/repo/module/docker/module.py @@ -12,6 +12,7 @@ ck=None # Will be updated by CK (initialized CK kernel) # Local settings +line='==========================================================================' ############################################################################## # Initialize module @@ -84,8 +85,9 @@ def call(i): data_uoa - CK entry with Docker description func - (build or run) - (scenario) - scenario to get CMD (default if empty) + (scenario) - scenario to get CMD ("default" if empty) (org) - organization (default - ctuning) + (tag) - container tag (sudo) - if 'yes', use sudo @@ -94,6 +96,8 @@ def call(i): (browser) - if 'yes', start browser (filename) - file to save/load external Docker image (data_uoa.tar by default) + + (no-cache) - if 'yes', add "--no-cache" to cmd } Output: { @@ -113,6 +117,8 @@ def call(i): sudo=i.get('sudo','') + ruoa=i.get('repo_uoa','') + duoa=i.get('data_uoa','') if duoa=='': return {'return':1, 'error':'please, specify CK entry with Docker description as following "ck build docker:{CK entry}"'} @@ -122,6 +128,7 @@ def call(i): # Load CK entry r=ck.access({'action':'load', + 'repo_uoa':ruoa, 'module_uoa':work['self_module_uid'], 'data_uoa':duoa}) if r['return']>0: return r @@ -132,6 +139,24 @@ def call(i): duoa=r['data_uoa'] duid=r['data_uid'] + # Check if aging (may not work) or outdated (likely not working) + if d.get('outdated','')=='yes' or d.get('aging','')=='yes': + ck.out(line) + if d.get('outdated','')=='yes': + ck.out('WARNING: this container is marked as outdated and unlikely to work!') + else: + ck.out('WARNING: this container is marked as aiging and may not to work!') + + ck.out('') + + r=ck.inp({'text':'Would you like to continue (y/N)?'}) + if r['return']>0: return r + s=r['string'].strip().lower() + if s!='y' and s!='yes': + return {'return':0} + + ck.out('') + # Check if reuse other entry re=d.get('reuse_another_entry','') if re!='': @@ -143,14 +168,17 @@ def call(i): # Choose scenario s=i.get('scenario','') - if s=='': s='default' + if s=='': + s='default' # Choose organization org=i.get('org','') + if org=='': + org=d.get('default_org','') if org=='': - org=ck.cfg.get('docker_org','') - if org=='': - org='ctuning' + org=ck.cfg.get('docker_org','') + if org=='': + org='ctuning' ecmd=i.get('cmd','') @@ -160,6 +188,53 @@ def call(i): if c=='': return {'return':1, 'error':'CMD to '+func+' Docker image is not defined in the CK entry ('+duoa+')'} + # Check tag + tags=d.get('docker_tags',[]) + tag='' + + if i.get('tag','')!='': + tag=i['tag'] + + elif len(tags)>0: + ck.out(line) + ck.out('Available tags:') + ck.out('') + + k=0 + for t in tags: + ck.out(str(k)+') '+t) + k+=1 + + ck.out('') + if i.get('quiet','')=='yes': + kk=0 + else: + r=ck.inp({'text':'Select a tag or press Enter to select 0: '}) + if r['return']>0: return r + + s=r['string'].strip() + if s=='': s='0' + + kk=int(s) + + if kk<0 or kk>=k: + return {'return':1, 'error':'tag number is not recognized'} + + tag=tags[kk] + + stag_dot='' + stag_colon='' + if tag!='': + ck.out('') + ck.out('Selected tag: '+tag) + ck.out('') + + stag_dot='.'+tag + stag_colon=':'+tag + + c=c.replace('$#CK_TAG_DOT#$', stag_dot) + c=c.replace('$#CK_TAG_COLON#$', stag_colon) + # Check if Windows pl=platform.system().lower() ps=d.get('platform_specific',{}).get(pl,{}) @@ -172,6 +247,7 @@ def call(i): if r['return']>0: return r ftmp=r['file_name'] + ck.out('') os.system(v[2:-1]+' > '+ftmp) # Read file @@ -193,7 +269,10 @@ def call(i): c=c.replace('$#CK_DOCKER_FILE#$',filename) if cmd!='': - c=cmd+' '+c + c=cmd+' '+c + + if i.get('no-cache','')=='yes': + c='--no-cache '+c c='docker '+func+' '+c @@ -336,3 +415,27 @@ def ximport(i): i['func']='import' return call(i) + +############################################################################## +# rebuild a given container + +def rebuild(i): + """ + Input: { + data_uoa - CK entry with Docker description + (scenario) - scenario to get CMD (default if empty) + (org) - organization (default - ctuning) + (cmd) - extra CMD + } + + Output: { + return - return code = 0, if successful + > 0, if error + (error) - error text if return > 0 + } + + """ + + i['func']='build' + i['no-cache']='yes' + return call(i) diff --git a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.bat b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.bat index c2b065da29..de7f0dee99 100644 --- a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.bat +++ b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.bat @@ -12,5 +12,5 @@ docker run ^ --volume %CK_HOST_REPO_EXPERIMENTS%:/home/ckuser/ck-experiments ^ --volume %CK_HOST_DATASETS%:/home/ckuser/datasets ^ --volume %CK_HOST_RUN_SCRIPT%:/home/ckuser/%CK_LOCAL_DOCKER_SCRIPT% ^ - -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 ^ + -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0:ubuntu-20.04 ^ "./%CK_LOCAL_DOCKER_SCRIPT%" diff --git a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.sh b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.sh index f9f9ce9fc0..96363b9eb1 100644 --- a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.sh +++ b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-external-imagenet-start.sh @@ -10,5 +10,5 @@ docker run \ --volume ${CK_HOST_REPO_EXPERIMENTS}:/home/ckuser/ck-experiments \ --volume ${CK_HOST_DATASETS}:/home/ckuser/datasets \ --volume ${CK_HOST_RUN_SCRIPT}:/home/ckuser/${CK_LOCAL_DOCKER_SCRIPT} \ - -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 \ + -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0:ubuntu-20.04 \ "./${CK_LOCAL_DOCKER_SCRIPT}" diff --git a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.bat b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.bat index 831871abf0..3201626ec1 100644 --- a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.bat +++ b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.bat @@ -11,5 +11,5 @@ set CK_HOST_DATASETS=X:\datasets docker run ^ --volume %CK_HOST_REPO_EXPERIMENTS%:/home/ckuser/ck-experiments ^ --volume %CK_HOST_RUN_SCRIPT%:/home/ckuser/%CK_LOCAL_DOCKER_SCRIPT% ^ - -it octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791-x8664-ubuntu-20.04 ^ + -it octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791:ubuntu-20.04 ^ "./%CK_LOCAL_DOCKER_SCRIPT%" diff --git a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.sh b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.sh index ed1fb4f13e..08da651534 100644 --- a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.sh +++ b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker-start.sh @@ -9,5 +9,5 @@ export CK_HOST_DATASETS=~/datasets docker run \ --volume ${CK_HOST_REPO_EXPERIMENTS}:/home/ckuser/ck-experiments \ --volume ${CK_HOST_RUN_SCRIPT}:/home/ckuser/${CK_LOCAL_DOCKER_SCRIPT} \ - -it octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791-x8664-ubuntu-20.04 \ + -it octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791:ubuntu-20.04 \ "./${CK_LOCAL_DOCKER_SCRIPT}" diff --git a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker.md b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker.md index df091367a1..7e5e4a6730 100644 --- a/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker.md +++ b/docs/mlperf-automation/reproduce/ck-image-classification-x86-64-docker.md @@ -10,13 +10,13 @@ ck pull repo:octoml@mlops ## Build Docker container with CK components and a small ImageNet (500 images) to test MLPerf™ workflows ``` -ck build docker:ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791-x8664-ubuntu-20.04 +ck build docker:ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791 --tag=ubuntu-20.04 ``` ## Run this container interactively ``` -ck run docker:ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791-x8664-ubuntu-20.04 +ck run docker:ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791 --tag=ubuntu-20.04 ``` You can now issue standard CK commands from [here](ck-image-classification-x86-64-tflite.md#install-models) to install ResNet-50 and benchmark it via loadgen. @@ -27,7 +27,7 @@ You can now issue standard CK commands from [here](ck-image-classification-x86-6 ### Linux ``` -docker run --rm octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791-x8664-ubuntu-20.04 \ +docker run --rm octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791:ubuntu-20.04 \ "ck install package --tags=model,tflite,resnet50,no-argmax && ck benchmark program:image-classification-tflite-loadgen \ --env.CK_LOADGEN_MODE=AccuracyOnly \ --env.CK_LOADGEN_SCENARIO=SingleStream \ @@ -75,7 +75,7 @@ export CK_HOST_DATASETS=~/datasets docker run \ --volume ${CK_HOST_REPO_EXPERIMENTS}:/home/ckuser/ck-experiments \ --volume ${CK_HOST_RUN_SCRIPT}:/home/ckuser/${CK_LOCAL_DOCKER_SCRIPT} \ - -it octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791-x8664-ubuntu-20.04 \ + -it octoml/ck-mlperf-inference-v1.0-image-classification-small-imagenet-fcbc9a7708491791:ubuntu-20.04 \ "./${CK_LOCAL_DOCKER_SCRIPT}" ``` diff --git a/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.bat b/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.bat index c18b1f23c6..cec591e2ca 100644 --- a/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.bat +++ b/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.bat @@ -11,5 +11,5 @@ set CK_HOST_DATASETS=X:\datasets docker run ^ --volume %CK_HOST_REPO_EXPERIMENTS%:/home/ckuser/ck-experiments ^ --volume %CK_HOST_RUN_SCRIPT%:/home/ckuser/%CK_LOCAL_DOCKER_SCRIPT% ^ - -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 ^ + -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0:ubuntu-20.04 ^ "./%CK_LOCAL_DOCKER_SCRIPT%" diff --git a/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.sh b/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.sh index f978f2c507..0a1f44a815 100644 --- a/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.sh +++ b/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker-start.sh @@ -9,5 +9,5 @@ export CK_HOST_DATASETS=~/datasets docker run \ --volume ${CK_HOST_REPO_EXPERIMENTS}:/home/ckuser/ck-experiments \ --volume ${CK_HOST_RUN_SCRIPT}:/home/ckuser/${CK_LOCAL_DOCKER_SCRIPT} \ - -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 \ + -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0:ubuntu-20.04 \ "./${CK_LOCAL_DOCKER_SCRIPT}" diff --git a/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker.md b/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker.md index 290d9c8b22..8c6ac5413d 100644 --- a/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker.md +++ b/docs/mlperf-automation/reproduce/ck-object-detection-x86-64-docker.md @@ -10,13 +10,13 @@ ck pull repo:octoml@mlops ## Build Docker container with CK components and workflows for MLPerf™ ``` -ck build docker:ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 +ck build docker:ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0 --tag=ubuntu-20.04 ``` ## Run this container interactively ``` -ck run docker:ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 +ck run docker:ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0 --tag=ubuntu-20.04 ``` You can now issue standard CK commands from [here](ck-object-detection-x86-64.md) to benchmark MLPerf™ model. @@ -25,7 +25,7 @@ You can now issue standard CK commands from [here](ck-object-detection-x86-64.md ### Linux ``` -docker run --rm octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 \ +docker run --rm octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0:ubuntu-20.04 \ "ck benchmark program:object-detection-tflite-loadgen \ --env.CK_SILENT_MODE=YES \ --skip_print_timers \ @@ -51,7 +51,7 @@ docker run --rm octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d ### Windows ``` -docker run --rm octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 ^ +docker run --rm octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0:ubuntu-20.04 ^ "ck benchmark program:object-detection-tflite-loadgen ^ --env.CK_SILENT_MODE=YES ^ --skip_print_timers ^ @@ -105,7 +105,7 @@ export CK_HOST_DATASETS=~/datasets docker run \ --volume ${CK_HOST_REPO_EXPERIMENTS}:/home/ckuser/ck-experiments \ --volume ${CK_HOST_RUN_SCRIPT}:/home/ckuser/${CK_LOCAL_DOCKER_SCRIPT} \ - -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0-x8664-ubuntu-20.04 \ + -it octoml/ck-mlperf-inference-v1.0-object-detection-4725481db87af8d0:ubuntu-20.04 \ "./${CK_LOCAL_DOCKER_SCRIPT}" ``` diff --git a/docs/mlperf-automation/tasks/task-object-detection.md b/docs/mlperf-automation/tasks/task-object-detection.md index 2b00764993..75f59005bb 100644 --- a/docs/mlperf-automation/tasks/task-object-detection.md +++ b/docs/mlperf-automation/tasks/task-object-detection.md @@ -279,7 +279,7 @@ We've prepared a Docker container with pre-installed MLPerf™ inference ben with object detection that you can use interactively to benchmark models and record results in your local repository for further analysis. -Feel free to check the [CK entry](https://github.com/octoml/mlops/tree/main/docker/ck-mlperf-inference-v1.0-object-detection-native-x8664-ubuntu-20.04) +Feel free to check the [CK entry](https://github.com/octoml/mlops/tree/main/docker/ck-mlperf-inference-v1.0-object-detection-native) with this container. You can also check [adaptive CK containers shared by OctoML](https://github.com/octoml/mlops/tree/main/docker) and other [CK containers shared by the community (they may be out of date - we plan to update them soon)](https://github.com/ctuning/ck-ml/tree/main/docker). @@ -287,7 +287,7 @@ and other [CK containers shared by the community (they may be out of date - we p First, build a given Docker container using CK as follows: ``` -ck build docker:ck-mlperf-inference-v1.0-object-detection-native-x8664-ubuntu-20.04 +ck build docker:ck-mlperf-inference-v1.0-object-detection-native --tag=ubuntu-20.04 ``` Then, create a local CK repository where you would like to record benchmarking results: @@ -302,7 +302,7 @@ export CK_HOST_REPO_EXPERIMENTS=`ck where repo:ck-experiments` echo ${CK_HOST_REPO_EXPERIMENTS} -docker run --volume ${CK_HOST_REPO_EXPERIMENTS}:/home/ckuser/ck-experiments -it octoml/ck-mlperf-inference-v1.0-object-detection-native-x8664-ubuntu-20.04 +docker run --volume ${CK_HOST_REPO_EXPERIMENTS}:/home/ckuser/ck-experiments -it octoml/ck-mlperf-inference-v1.0-object-detection-native:ubuntu-20.04 ``` Use this ugly hack to be able to record to your host CK repository: