AGENT SKILL

operations-and-security

Operate and secure Xinference deployment surfaces, including environment variables, auth, API keys, metrics, logging, Web UI static serving, and production deployment notes.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
operations-and-security
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Operate and secure Xinference deployment surfaces, including environment variables, auth, API keys, metrics, logging, Web UI static serving, and production deployment notes.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Operations and Security

Use this sub-skill for production-facing Xinference concerns: environment variables, persistent state, auth bootstrap, API keys, OIDC, audit/admin, metrics, logging, frontend static serving, IP and network exposure, Docker/Kubernetes deployment, and operational safety.

Use this for

  • XINFERENCE_HOME, model cache/source, launch history, log, auth DB, and frontend dist path planning.
  • Health checks, metrics exporter host/port, disabling metrics, request timeouts, concurrency, batching, and launch strategy knobs.
  • Advanced auth, users, API keys, password reset/migration CLI entry points, JWT/encryption key persistence, OIDC, audit logs, and Elasticsearch-backed audit search.
  • Allowed IPs, trusted proxies, permissive CORS caveats, and network exposure boundaries.
  • Docker, Docker Compose, Kubernetes, and static Web UI deployment notes.

Route elsewhere

  • Model launch flags, replicas, GPU placement, cache/model lifecycle CLI syntax, and distributed supervisor/worker command templates: serving-and-cli.
  • Model families, optional backend extras, LoRA, virtualenv model dependencies, and custom model specs: models-and-backends.
  • Python client calls, HTTP request bodies, OpenAI-compatible snippets, and streaming behavior: client-and-api.

Working pattern

  1. Establish the deployment shape: local, Docker/Compose, Kubernetes, or a supervisor/worker cluster behind a proxy.
  2. Choose persistent XINFERENCE_HOME and related DB/log/cache paths before enabling auth or relying on launch history.
  3. Decide whether advanced auth stays enabled; if it does, plan admin bootstrap, API key issuance, token storage, and recovery procedures.
  4. Configure network exposure separately from CORS. Treat allowed IPs and trusted proxies as access-control inputs.
  5. Decide metrics/logging/audit policy before exposing /metrics or collecting audit records.
  6. Route model-specific failures or request-body failures to sibling sub-skills.

Security rules

  • Never invent or print real default credentials, JWT secrets, encryption keys, OIDC client secrets, model hub tokens, or API keys.
  • Use placeholders such as <api-key>, <jwt-secret>, and <oidc-client-secret> in examples.
  • Persist auth secrets and databases under stable storage before depending on users, permissions, or API keys across restarts.
  • Treat permissive CORS as non-authoritative; use network boundaries, IP restrictions, and trusted proxy settings for real access control.
  • Keep static environment matrices from reading live secret values unless the user explicitly asks for a local audit.

References

  • Configuration for environment variables grouped by persistence, model source, health, launch, frontend, auth, and virtualenv.
  • Security and auth for advanced auth, API keys, OIDC, reset/migration, and audit/admin guidance.
  • Metrics and observability for Prometheus metrics, logging, and OpenTelemetry notes.
  • Deployment notes for local, Docker, Compose, Kubernetes, frontend, and external-service caveats.
  • Troubleshooting for auth failures, missing Web UI assets, disabled metrics, proxy/IP issues, and persistence mistakes.

Helper script

  • render_env_matrix.py prints a static matrix of important environment variables without reading or revealing live values.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351