build-docker-image
Automatically generated README for this automation recipe: build-docker-image
Category: Docker automation
License: Apache 2.0
-
Notes from the authors, contributors and users: README-extra
-
CM meta description for this script: _cm.yaml
- Output cached? False
Reuse this script in your project
Install MLCommons CM automation meta-framework
Pull CM repository with this automation recipe (CM script)
cm pull repo mlcommons@cm4mlops
Print CM help from the command line
cmr "build docker image docker-image dockerimage" --help
Run this script
Run this script via CLI
cm run script --tags=build,docker,image,docker-image,dockerimage [--input_flags]
Run this script via CLI (alternative)
cmr "build docker image docker-image dockerimage " [--input_flags]
Run this script from Python
import cmind
r = cmind.access({'action':'run'
'automation':'script',
'tags':'build,docker,image,docker-image,dockerimage'
'out':'con',
...
(other input keys for this script)
...
})
if r['return']>0:
print (r['error'])
Run this script via Docker (beta)
cm docker script "build docker image docker-image dockerimage" [--input_flags]
Script flags mapped to environment
--cache=value
→CM_DOCKER_CACHE=value
--cm_repo=value
→CM_MLOPS_REPO=value
--docker_os=value
→CM_DOCKER_OS=value
--docker_os_version=value
→CM_DOCKER_OS_VERSION=value
--dockerfile=value
→CM_DOCKERFILE_WITH_PATH=value
--gh_token=value
→CM_GH_TOKEN=value
--image_name=value
→CM_DOCKER_IMAGE_NAME=value
--image_repo=value
→CM_DOCKER_IMAGE_REPO=value
--image_tag=value
→CM_DOCKER_IMAGE_TAG=value
--post_run_cmds=value
→CM_DOCKER_POST_RUN_COMMANDS=value
--pre_run_cmds=value
→CM_DOCKER_PRE_RUN_COMMANDS=value
--push_image=value
→CM_DOCKER_PUSH_IMAGE=value
--real_run=value
→CM_REAL_RUN=value
--script_tags=value
→CM_DOCKER_RUN_SCRIPT_TAGS=value
Default environment
These keys can be updated via --env.KEY=VALUE
or env
dictionary in @input.json
or using script flags.
- CM_DOCKER_IMAGE_REPO:
local
- CM_DOCKER_IMAGE_TAG:
latest
Native script being run
Script output
cmr "build docker image docker-image dockerimage " [--input_flags] -j