domino-hpc-slurm
Run Slurm HPC batch workloads on Domino - a Slurm cluster attached to a Workspace (sbatch, squeue, sacct, scancel, array and dependent jobs, a Dataset as the shared file system) and HPC Jobs over /api/hpc/v1/jobs (start, list, details, logs, cancel). Covers the Slurm-enabled data plane, client and worker environments, worker tiers, finding them by API, submit-supported, output paths, limits and troubleshooting. Use for existing sbatch scripts, parameter sweeps, simulations and ensembles on Domino; Spark, Ray, Dask and Open MPI clusters are domino-distributed-computing.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 5
- Forks
- 4
01 前言 Front Matter
- name
- domino-hpc-slurm
- description
- Run Slurm HPC batch workloads on Domino - a Slurm cluster attached to a Workspace (sbatch, squeue, sacct, scancel, array and dependent jobs, a Dataset as the shared file system) and HPC Jobs over /api/hpc/v1/jobs (start, list, details, logs, cancel). Covers the Slurm-enabled data plane, client and worker environments, worker tiers, finding them by API, submit-supported, output paths, limits and troubleshooting. Use for existing sbatch scripts, parameter sweeps, simulations and ensembles on Domino; Spark, Ray, Dask and Open MPI clusters are domino-distributed-computing.
- compatibility
- Domino 6.3 and Domino Cloud. Requires DOMINO_API_HOST; in a run use DOMINO_API_PROXY or the localhost:8899 access-token endpoint, outside a run a Personal Access Token.
02 资源文件 2
- 参考文档API.md11.5 KB
- 参考文档EXAMPLES.md5.9 KB
03 SKILL.md 正文
Domino HPC with Slurm
Applies to Domino 6.3 and Domino Cloud.
Each Slurm-enabled data plane runs one persistent Slurm cluster; workers are provisioned per Workspace from zero and autoscaled with the queue. A Workspace with a Slurm cluster attached is the login node, with the Slurm CLI configured, so existing sbatch scripts run unchanged. Spark, Ray, Dask and MPI get an ephemeral cluster per execution instead (domino-distributed-computing).
Docs: https://docs.domino.ai/cloud/platform-capabilities/features/compute-clusters-hpc/slurm and /cloud/admin/infrastructure-and-compute/administer-slurm (same paths under /6.3/).
Is Slurm available here?
Ask the platform, not the Workspace. GET /v4/dataplanes/dataplanes (non-public route; may change in a future Domino version, see route types) lists the data planes with status.supportsSlurm; GET /api/hpc/v1/jobs/submit-supported?projectId=&dataPlaneId= says whether this Project can submit there. Offer to attach a cluster only when a Slurm-enabled plane exists; with none, Slurm is an administrator task.
Prerequisites
- A data plane with Slurm installed; enabled when the data plane is deployed, never afterwards.
- Two environments the administrator creates (domino-environments): the Workspace environment with the Slurm CLI (Supported Clusters none) and the cluster environment for the workers (Supported Clusters Slurm).
- A worker hardware tier on that data plane.
- A Dataset on that data plane (domino-datasets): the shared file system for scripts, inputs and outputs, since Slurm copies no files between Workspace and workers (
/domino/datasets/local/<name>in a DFS Project,/mnt/data/<name>in a Git-based one).
Usernames have to be valid Linux usernames (^[a-z_][a-z0-9_-]{0,31}), or the launch fails.
Path 1: a Slurm cluster attached to a Workspace
Workspaces > + Create New Workspace (domino-workspaces): the Slurm Workspace environment, a tier on the Slurm-enabled data plane, then Compute Cluster = Slurm with Worker Hardware Tier, Max Number of Workers and Cluster Compute Environment. By API: computeClusterConfig with "clusterType": "Slurm", no master tier, after checking that the tier's data plane has Slurm; the create route accepts any plane (API.md).
Terminal: sinfo (zero nodes when idle is normal), sbatch job.sh (prints the job id), squeue -j <id> (PD pending while workers provision, R running, empty = done), scontrol show job <id> while queued or running, sacct -j <id> after completion (filter by job, user or time, never sacct -a), scancel <id>.
Resource requests go in #SBATCH header lines or as sbatch options (--time, --cpus-per-task, --mem), which override the header. Arrays: --array=0-9 plus $SLURM_ARRAY_TASK_ID in each task's output path. Dependencies: --dependency=afterok:<id> (afterany, afternotok). Domino overrides --output and --error to collect the logs, so redirect inside the script to the Dataset; workers neither read nor write the Workspace files, so code and inputs live in the Dataset too. Write a real Dataset name (with several, the one holding the inputs or the Project's default; say which); never leave <...> in a script, since angle brackets are shell redirections. Start every script with umask 077: workers and their Unix group are shared between users, so files are otherwise readable by others.
#!/bin/bash
#SBATCH --job-name=sweep
#SBATCH --array=1-3
umask 077
D=/domino/datasets/local/my-dataset # a Dataset of the Project: ls $DOMINO_DATASETS_DIR
{ echo "task $SLURM_ARRAY_TASK_ID on $(hostname)"; python3 "$D/run.py" "$SLURM_ARRAY_TASK_ID"; } > "$D/sweep_$SLURM_ARRAY_TASK_ID.txt" 2>&1
Path 2: HPC Jobs through the API
The HPC tab on the Project's Jobs page lists every HPC Job. Its Run button needs the ShortLived.EnableHPCJobs feature flag; it and the API below need a Slurm partition the administrator sets up for the Project on the target data plane (a preview on Domino 6.3). sbatch in a Workspace needs neither.
Call submit-supported first (dataPlaneId required); on false stop and report, do not start: a start there is a 500 (503) Unexpected response code, creates nothing and fails again on retry.
| Route | Notes |
|---|---|
POST /api/hpc/v1/jobs |
projectId, filePath, dataPlaneId; optional title, mainRepoGitRef, config (cpu, gpu, memory, nodes, ntasks, walltime HH:MM:SS); 202, no body |
GET /api/hpc/v1/jobs?projectId= |
offset, limit, sortBy, ascending, statusFilter |
GET /api/hpc/v1/jobs/{jobId} |
status, requestedResources, usage, stageTime, script |
GET /api/hpc/v1/jobs/{jobId}/logs |
limit, latestTimeNano, logType; page until logset.isComplete |
POST /api/hpc/v1/jobs/cancel |
{"jobId"}; 204 |
filePath is relative to the Project root and runs from the latest commit (or mainRepoGitRef), never from a Dataset; a path missing from that commit is refused with 403. The start response carries no id: list with sortBy=number&limit=1 for the new Job. python-domino has no HPC methods. Code, errors: API.md.
import os, requests
base, q = os.environ["DOMINO_API_PROXY"], {"projectId": os.environ["DOMINO_PROJECT_ID"], "dataPlaneId": "<data plane id>"}
assert requests.get(f"{base}/api/hpc/v1/jobs/submit-supported", params=q).json()["supported"], "no HPC submission here"
requests.post(f"{base}/api/hpc/v1/jobs", json={**q, "filePath": "hpc/sweep.sh", "config": {"cpu": 4, "walltime": "02:00:00"}}).raise_for_status()
Limitations
- The cluster attaches at Workspace launch; a standard Job cannot carry a Slurm cluster; submit through
/api/hpc/v1/jobs. - Workers reach Datasets and NetApp Volumes: no Data Sources.
- No interactive or scheduled Slurm jobs; no external Slurm clusters.
- Jobs of different users share worker nodes and one Unix group, unsandboxed, so every script sets
umask 077.
Troubleshooting
- Slurm option disabled in the launcher: no Slurm worker environment is visible to you, or the tier's data plane has no Slurm.
- Output files missing:
--outputand--errorare overridden; redirect inside the script to a Dataset path that exists on the workers. - Jobs stay
PD: a cold cluster is provisioning; if nothing ever dispatches, the request exceeds the worker tier or Max Number of Workers, or a Slurm limit applies. - Workspace stuck in
PendingorInitializingwith eventsFailedMount ... slurm-jwt-secret ... not found: its data plane has no Slurm. Stop and delete the Workspace, then use a Slurm-enabled plane or ask the administrator.
Reference files
- API.md: discovery, start, poll, logs, cancel, errors, Workspace cluster body.
- EXAMPLES.md: array, sweep, SMP, GPU and dependency scripts.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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.