AGENT SKILL

domino-model-endpoints

Publish and call Domino endpoints (model APIs) for synchronous or asynchronous predictions. Covers the prediction function and request JSON, how the endpoint image is built (environment, required packages, no requirements.txt), sync Basic-auth vs async Bearer invocation, versions and routing, instance counts and endpoint hardware tiers, health checks, metrics and logs. Use when deploying a model as an API from the UI, writing predict code, calling an endpoint, or debugging a slow or failing endpoint. For scripted lifecycle automation over REST (create, version, archive, logs) use domino-model-serving; for drift and model-quality monitoring use domino-model-monitoring; for batch scoring Jobs and for exporting a model out of Domino (an image to your registry, NVIDIA Fleet Command, a Snowflake UDF, SageMaker) use domino-model-delivery.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 5
Forks
4

01 前言 Front Matter

name
domino-model-endpoints
description
Publish and call Domino endpoints (model APIs) for synchronous or asynchronous predictions. Covers the prediction function and request JSON, how the endpoint image is built (environment, required packages, no requirements.txt), sync Basic-auth vs async Bearer invocation, versions and routing, instance counts and endpoint hardware tiers, health checks, metrics and logs. Use when deploying a model as an API from the UI, writing predict code, calling an endpoint, or debugging a slow or failing endpoint. For scripted lifecycle automation over REST (create, version, archive, logs) use domino-model-serving; for drift and model-quality monitoring use domino-model-monitoring; for batch scoring Jobs and for exporting a model out of Domino (an image to your registry, NVIDIA Fleet Command, a Snowflake UDF, SageMaker) use domino-model-delivery.
compatibility
Domino 6.3 and Domino Cloud. Management calls need DOMINO_API_HOST; in a run use DOMINO_API_PROXY or the localhost:8899 access-token endpoint, outside a run a Personal Access Token. Prediction calls use the endpoint's own access token.

02 资源文件 3

03 SKILL.md 正文

Domino endpoints (model APIs)

Applies to Domino 6.3 and Domino Cloud.

A Domino endpoint (Model API in the API) wraps a function from your project in an HTTP API: Domino builds an image from the selected compute environment plus the project files, adds a Flask (Python) or Plumber (R) harness, sources your script once at publish time, and routes each request to your function.

Which skill

Need Skill
UI publish, predict function, calling, instances, health, logs this skill
REST lifecycle: create, version, list, delete, logs, registered models domino-model-serving
Drift, model quality, prediction capture domino-model-monitoring
Batch scoring with a Job; export the model out of Domino (image to your registry or Kubernetes, NVIDIA Fleet Command, Snowflake UDF, SageMaker) domino-model-delivery

Reference files

File Use when
DEPLOY-ENDPOINT.md Predict function, sync before publish, API and registry publish, health check, calling, versions, access
SCALING.md Instance count, endpoint tiers, routing modes, parallelism
MONITORING.md CPU, memory, status codes, health checks, timeouts, logs

Packaging rules (what breaks publishes)

  • The environment is chosen per endpoint (environmentId is required by the API). Python endpoints need uwsgi, flask, six and prometheus-client; async ones also seldon-core. Domino Standard Environments ship them (the minimal image lacks seldon-core and mlflow).
  • Endpoint hosts do not read requirements.txt or run environment setup scripts; put packages in the environment's Dockerfile instructions. Exception: a registry model's MLflow-inferred requirements.txt is installed at build.
  • Project environment variables are not inherited; set endpoint variables under Settings and restart running versions.
  • The image is built from the Project's committed files, never the Workspace disk: DFS, File Changes > Sync to Domino first; Git-based, commit and push the code and sync artifacts. Include every file the function loads and pin that commit (version.commitId): the head lags an upload by seconds, and a missing file crash-loops the container with FileNotFoundError ("Sync or commit first", DEPLOY-ENDPOINT.md). Files mount at /mnt/<username>/<project_name> (DOMINO_WORKING_DIR); .modelignore excludes files; images over 500 MB fail. New files need a new version.
  • The endpoint runs as uid/gid 12574; the image build runs as the Dockerfile's last USER.

Quick start

Sources: a project-file prediction function (pickle path below) or a Model Registry version.

# model.py (project root)
import pickle
_model = pickle.load(open("model.pkl", "rb"))   # runs once, when the version starts

def predict(sepal_length, sepal_width, petal_length, petal_width):
    pred = _model.predict([[sepal_length, sepal_width, petal_length, petal_width]])
    return {"variety": str(pred[0])}            # JSON-serializable: no NumPy types

Registry path: mlflow.sklearn.log_model(model, "model", signature=sig, input_example=X[:5], registered_model_name="iris-rf") in a run (or Register model from run in Experiments), then pick that model and version in Create Domino Endpoint; by API version.source = {"type": "Registry", "registeredModelName": "iris-rf", "registeredModelVersion": 1}. Domino installs the MLflow-inferred requirements.txt (DEPLOY-ENDPOINT.md; domino-experiment-tracking MODEL-REGISTRY.md).

  1. Sync or commit model.py and model.pkl (packaging rules), then go to Deployments > Endpoints > Create Domino Endpoint.
  2. Name, description, the file (model.py) and function (predict), or the registered model and version.
  3. Pick the compute environment, instance count and endpoint hardware tier (SCALING.md).
  4. Request Type: Sync (real-time) or Async (long-running; payloads by reference).
  5. Publish, wait for Running, then confirm health: a Tester request succeeds, or the model container logs WSGI app 0 (mountpoint='') ready (a crash loop also reports Running). The Overview tab shows the URL, model ID and code samples.

Calling an endpoint

Restricted endpoints need an access token (Settings > Invocation); sync and async authenticate differently:

# Sync: HTTP Basic, the token as username and password
curl -s -u "$MODEL_API_TOKEN:$MODEL_API_TOKEN" -H "Content-Type: application/json" \
  -d '{"data": {"sepal_length": 5.1, "sepal_width": 3.5, "petal_length": 1.4, "petal_width": 0.2}}' \
  "$DEPLOYMENT_URL/models/$MODEL_ID/latest/model"

Async endpoints use Authorization: Bearer $MODEL_API_TOKEN at .../api/modelApis/async/v1/$MODEL_ID and return an asyncPredictionId to poll.

DEPLOYMENT_URL is the deployment's external URL (the one you sign in at; no API field or in-run variable holds it, and in-run hosts do not route /models/...) and MODEL_ID the endpoint id; both are on the Overview tab. The token: use the one the user supplies, otherwise create one and store it as a Domino environment variable without ever printing it (DEPLOY-ENDPOINT.md "Access tokens"); your own Domino token gets 401 even on a Public endpoint. Never put the token in browser code.

Versions and routing

Each publish creates a version. Basic routing (default) points /models/<modelId>/latest/model at the newest successful version and stops the old one; Advanced adds a promoted version at /models/<modelId>/labels/prod/model so clients stay on production while you test latest (Settings > Deployment). A scheduled Job can redeploy on fresh data via Update Domino Endpoint.

Troubleshooting

Symptom Check
Build fails on an import Put the package in the environment Dockerfile, not requirements.txt
IOException ... 500 in the build log Image over 500 MB; add large files to .modelignore
401 on predictions Sync: Basic auth with the endpoint token; async: Bearer; user tokens and PATs never work
Running but 503, or Running / Starting alternating Crash loop; model-container logs (no tail, maxResults=3000) show FileNotFoundError ... no app loaded. Sync, pin the commit, republish
504 Request timeout (default 60 s) under Settings > Advanced; restart after changing
Not Running Build, export, instance logs (Logs column); health-check settings

Documentation

04 同仓库更多 Skills

dominodatalab
dominodatalab/domino-ai-plugin

tags-and-properties

Manage Domino tags and properties via the Tags (Taxonomy) API at /api/taxonomy/v1. Covers namespaces and tags (create, list, update, deprecate, delete; tag entities such as projects, models, datasets, apps, project templates, NetApp volumes, environments; query by tag; autocomplete; merge; CSV import/export) and properties (typed metadata fields - text, number, date, boolean, url, user, organization, select, multi_select - with per-entity values, groups and versioned entities like model_version/app_version). Use when organizing entities with tags, building hierarchical namespaces, defining typed metadata fields, setting property values, finding entities by tag, bulk-tagging during onboarding, or migrating a taxonomy across environments.

★ 5
dominodatalab
dominodatalab/domino-ai-plugin

netapp-volumes

Work with Domino Volumes for NetApp ONTAP (NetApp Volumes) - shared, multi-terabyte storage with near-instant snapshots. Covers creating volumes, attaching them to projects, mount paths (/mnt/netapp-volumes/ or /domino/netapp-volumes/), snapshots and tags, roles, deletion, mounting volumes in jobs, and the NetApp Volumes REST API (/remotefs/v1). Use when managing large-scale shared data, taking fast no-copy snapshots, or integrating NetApp ONTAP storage with Domino.

★ 5
dominodatalab
dominodatalab/domino-ai-plugin

domino-workspaces

Work with Domino Workspaces - interactive sessions running Jupyter, JupyterLab, VS Code or RStudio on a hardware tier with a compute environment. Covers launching and configuring a Workspace, what persists across stop and resume, file paths and syncing for DFS and Git-based Projects, package and home-directory persistence, SSH access from a local IDE, the Workspace API routes, and troubleshooting. Use when setting up or debugging an interactive development session in Domino.

★ 5
dominodatalab
dominodatalab/domino-ai-plugin

domino-ui-bootstrap

Bootstrap or retrofit a Vite + React 18 + TypeScript project so it uses the Domino design system (`@dominodatalab/extensions-tools`). Scoped to a **fully standalone SPA frontend for a Domino application or extension**, not snippets, library additions, or work inside an existing Domino monorepo package. Use whenever the user wants to create, scaffold, refactor, retrofit, or set up such an SPA (a React app, web app, frontend, UI, or extension) that should "look like Domino", use Domino components, follow the Domino design system, or integrate with the Domino platform, including when they mention DominoThemeProviderDecorator, extensions-tools, or base-components without saying "Domino". Also use to make an existing standalone React/Vite project "Domino-styled" or add Domino theming. Handles React 18 / react-router 5 pinning, Storybook MCP registration, theme provider wiring, and build verification.

★ 5
dominodatalab
dominodatalab/domino-ai-plugin

domino-trace-setup

Set up GenAI tracing for an LLM or agent application in Domino by checking the Domino SDK and MLflow requirements (the DSE needs nothing installed), then adding a tracing_setup.py helper, span evaluators, a config.yaml, and @add_tracing / DominoAgentContext wiring. Use when the user asks to add tracing, observability, or evaluation to an agent or LLM app running on Domino.

★ 5
dominodatalab
dominodatalab/domino-ai-plugin

domino-rust-apps

Build a Rust web app (axum) in Domino and ship it as a Domino App that starts from a prebuilt binary. Covers installing a pinned Rust toolchain into a Compute Environment with rustup, Cargo project defaults (edition 2024, rust-toolchain.toml, Cargo.lock, Clippy pedantic, rustfmt, cargo-nextest, cargo-deny), rust-analyzer for the IDE and coding agents, check hooks, calling Domino as the viewer with extended identity propagation, dev and release build profiles, keeping target/ out of Git and Domino storage, and an app.sh that runs the binary in App Preview and deployments without compiling. Use when the user wants a Rust app, API, dashboard or Proa site on Domino, a performance-sensitive or correctness-critical App, or asks to set up Rust, cargo, Clippy, nextest or rust-analyzer in a Domino Workspace or environment.

★ 5