cli-and-cloud
Use BentoML CLI command families and BentoCloud workflows safely: login/context, deploy/deployment lifecycle, codespaces, secrets, API tokens, push/pull, and cloud troubleshooting. Use when a task asks for bentoml terminal commands or BentoCloud operations rather than Python service authoring, local serving/client calls, container builds, or observability setup.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- cli-and-cloud
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use BentoML CLI command families and BentoCloud workflows safely: login/context, deploy/deployment lifecycle, codespaces, secrets, API tokens, push/pull, and cloud troubleshooting. Use when a task asks for bentoml terminal commands or BentoCloud operations rather than Python service authoring, local serving/client calls, container builds, or observability setup.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/bentocloud-workflows.md6.3 KB
- 参考文档references/cli-catalog.md6.8 KB
- 参考文档references/troubleshooting.md4.5 KB
- 脚本scripts/deployment_config_lint.py6.9 KB
- 脚本scripts/inspect_bentoml_cli.py2.5 KB
03 SKILL.md 正文
BentoML CLI And BentoCloud
Use this sub-skill when the user needs a safe command plan or troubleshooting path for BentoML CLI and BentoCloud. Treat credentialed cloud commands as user-run operations unless the user explicitly asks you to execute them in an authenticated environment.
Safe Operating Rules
- Prefer local, non-mutating checks first:
bentoml --help,bentoml <command> --help, config-file linting, and command construction. - Never print, store, or request raw API token values.
bentoml api-token createshows the token once; tell the user to save it securely outside the transcript. - Ask before running credentialed or mutating cloud operations such as
bentoml cloud login,bentoml deploy,bentoml deployment update/apply/start/terminate/delete,bentoml secret create/apply/delete,bentoml api-token create/delete,bentoml push, andbentoml pull. - Classify destructive operations clearly:
deployment deleteis irreversible,deployment terminatestops billing-capable workloads but can be restarted, andsecret delete/api-token deletecan break deployments or automation. - Do not put secrets in command lines when avoidable. Use environment variables, files managed by the user, or BentoCloud secrets, and redact values in outputs.
Workflow Routing
- For CLI command discovery and safe local checks, use
references/cli-catalog.mdandscripts/inspect_bentoml_cli.py. - For BentoCloud login, context, deployment, codespace, secret, API-token, push/pull, and CI/CD command plans, use
references/bentocloud-workflows.md. - For errors such as not logged in, wrong context/cluster, missing tokens/secrets, invalid deployment config, wait timeout, quota, auth failures, or destructive-operation risk, use
references/troubleshooting.md. - For deployment YAML/JSON review before a cloud call, run
scripts/deployment_config_lint.pylocally.
Common Command Plans
Inspect CLI Without Cloud Access
python skills/bentoml/sub-skills/cli-and-cloud/scripts/inspect_bentoml_cli.py --commands "cloud" "deployment" "deploy" "secret" "api-token"
This helper only imports the local CLI and renders Click help through CliRunner; it does not log in or contact BentoCloud.
Login And Verify Context
bentoml cloud login
bentoml cloud current-context
bentoml cloud list-context
Use bentoml cloud login --api-token "$BENTOCLOUD_API_TOKEN" only in user-controlled shells or CI logs with secret masking. The CLI also accepts BENTO_CLOUD_API_ENDPOINT and BENTO_CLOUD_API_KEY environment variables.
Deploy From A Project Directory
bentoml deploy . -n my-deployment --cluster my-cluster --scaling-min 0 --scaling-max 3 --wait --timeout 3600
If configuration is complex or there are multiple services, prefer a YAML/JSON config and lint it first:
python skills/bentoml/sub-skills/cli-and-cloud/scripts/deployment_config_lint.py config-file.yaml
bentoml deploy -f config-file.yaml
Manage A Deployment
bentoml deployment list --cluster my-cluster
bentoml deployment get my-deployment --cluster my-cluster -o yaml
bentoml deployment update my-deployment --cluster my-cluster --scaling-min 1 --scaling-max 5
bentoml deployment apply my-deployment --cluster my-cluster -f deployment.yaml
bentoml deployment terminate my-deployment --cluster my-cluster --wait
Use update for patch-only changes. Use apply when the config should become the desired full state; it can reset or remove unspecified fields.
Cross-References
- CLI command catalog:
references/cli-catalog.md - BentoCloud workflows:
references/bentocloud-workflows.md - Troubleshooting guide:
references/troubleshooting.md - Local CLI help inspector:
scripts/inspect_bentoml_cli.py - Local deployment config linter:
scripts/deployment_config_lint.py
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).