remote-run-commands
Automatically generated README for this automation recipe: remote-run-commands
Category: Remote automation
License: Apache 2.0
-
Notes from the authors, contributors and users: README-extra
-
CM meta description for this script: _cm.json
- 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 "remote run cmds remote-run remote-run-cmds ssh-run ssh" --help
Run this script
Run this script via CLI
cm run script --tags=remote,run,cmds,remote-run,remote-run-cmds,ssh-run,ssh [--input_flags]
Run this script via CLI (alternative)
cmr "remote run cmds remote-run remote-run-cmds ssh-run ssh " [--input_flags]
Run this script from Python
import cmind
r = cmind.access({'action':'run'
'automation':'script',
'tags':'remote,run,cmds,remote-run,remote-run-cmds,ssh-run,ssh'
'out':'con',
...
(other input keys for this script)
...
})
if r['return']>0:
print (r['error'])
Run this script via Docker (beta)
cm docker script "remote run cmds remote-run remote-run-cmds ssh-run ssh" [--input_flags]
Script flags mapped to environment
--client_refresh=value
→CM_SSH_CLIENT_REFRESH=value
--host=value
→CM_SSH_HOST=value
--password=value
→CM_SSH_PASSWORD=value
--port=value
→CM_SSH_PORT=value
--run_cmds=value
→CM_SSH_RUN_COMMANDS=value
--skip_host_verify=value
→CM_SSH_SKIP_HOST_VERIFY=value
--ssh_key_file=value
→CM_SSH_KEY_FILE=value
--user=value
→CM_SSH_USER=value
Default environment
These keys can be updated via --env.KEY=VALUE
or env
dictionary in @input.json
or using script flags.
- CM_SSH_PORT:
22
- CM_SSH_HOST:
localhost
- CM_SSH_USER:
$USER
- CM_SSH_CLIENT_REFRESH:
10
- CM_SSH_KEY_FILE:
$HOME/.ssh/id_rsa
Native script being run
Script output
cmr "remote run cmds remote-run remote-run-cmds ssh-run ssh " [--input_flags] -j