Doca setup

From NVIDIA/skills · View interactive version

Doca setup is an AI agent skill from the GitHub repository NVIDIA/skills. Use this skill when the user is dealing with the DOCA environment around their workload — verifying an install is healthy, preparing the build env (pkg-config, headers, LD_LIBRARY_PATH, hugepages, devlink, representors), debugging env-class failures, deciding container-vs-bare-metal deployment shape

How to use this skill

Skill file

DOCA setup

Host checks. Commands here that inspect the user's DOCA host (listing or reading /opt/mellanox/doca, release files such as /etc/mlnx-release or /etc/nvidia/bf-release, /dev/mst) or reach the BlueField (RShim, SSH, BMC) are for that host. Run them yourself only if the user confirms you are on it; otherwise answer from this skill, give the commands for the user to run, and treat values you can't see as unknown.

Where to start: If the user's question is deployment-shaped

("how do I deploy", "how do I run my DOCA workload", *"I just got a

BlueField, what now", "my code is built, what next"*), walk

CODE0 first. It is the

bundle's front-door: it detects the system shape (host x86 / BlueField

Arm bare-metal / DPU-only / fresh laptop), asks the developer the

minimal set of questions needed to disambiguate, and routes to the

correct downstream skill — the container deployment path

(doca-container-deployment/SKILL.md),

the bare-metal hardware deployment path

(doca-bare-metal-deployment/SKILL.md),

or the no-hardware fallback

(CODE0). The wrong failure

mode is to silently steer every developer onto containers because the

agent loaded that skill first; ## recognize exists to prevent that.

If the user does not have DOCA installed yet and the request is not

deployment-shaped, jump straight to

CODE0 for the NGC container

path. Deployment-shaped requests still enter ## recognize first,

which routes fresh-laptop cases to ## no-install. Otherwise read

CODE0 to confirm the

question is env-class, then route to the section below that matches the

user's intent.

Do not use this skill for:

matches, actions, entries), including when the user says the environment

and versions are already verified. That belongs to doca-flow: name it

and stop. Do not run ## recognize, environment checks or the

verification contract for it.

library skill.

DOCA_ERROR_* means: doca-programming-guide.

Examples

The CLASSES this skill is built to handle, each with one worked example.

The skill must answer the class; the worked example is illustrative.

1. Apply the "How to pick an NGC tag without guessing" rule (`doca-setup

TASKS.md`): copy the tag from the NGC catalog Tags page

(https://catalog.ngc.nvidia.com/orgs/nvidia/teams/doca/containers/doca/tags);

never guess a tag or use :latest.

2. Explain the tag shape for DOCA 3.5: <flavor>-<version>[-host], for

example devel-3.5.0-host. Flavor devel builds, full-rt / base-rt

run; -host is the multi-arch host image (x86_64 and aarch64 alike) and

the same tag without -host is the BlueField Arm image; 3.5 has no OS

or architecture fragment, while DOCA 3.3 also published

<version>-devel-amd64-host / -arm64-host. Always say which CPU

architecture the recommended tag serves (x86_64 = amd64, Arm / Apple

Silicon = arm64) and whether it is the host or the BlueField image.

Before giving one tag, ask which CPU architecture (amd64 or arm64)

and which target (host or BlueField) they pull for, unless the user

already said; then give the tag for that answer.

3. Verify what was pulled: run pkg-config --modversion doca-common inside

the container and check it matches the version in the tag.

building and running accelerated networking, storage and security

workloads on BlueField DPUs and ConnectX NICs. First action: run

pkg-config --modversion doca-common (or ls /opt/mellanox/doca). No

install yet: pull the NGC DOCA container, copying the tag for your DOCA

version from the NGC catalog Tags page; never hardcode a tag.

Instructions

Follow CODE0. Open TASKS.md or

CAPABILITIES.md as named there. Do not open every companion file.

worked example: *"I just got a BlueField; my code is built; what

now?"* Resolved by the front-door decision tree in

CODE0, which detects the

system shape, asks the minimum residual question, and routes to

either the container or the bare-metal deployment skill.

"Is DOCA Flow actually available on this box?" Resolved by the

install-health snapshot in CODE0 plus the

version-detection rules in

CODE0.

on macOS and want to learn DOCA before I get a BlueField."* Resolved

by CODE0 (NGC DOCA container

as universal Stage-1).

example: *"pkg-config --cflags doca-flow returns nothing — what's

missing?"* Resolved by the build-prep workflow in

CODE0 and the build-class

error taxonomy in

CODE0.

example: *"hugepages / representors / devlink — what's the minimum set

before I run my first DOCA Flow program?"* Resolved by

CODE0 and the runtime

observability rules in

CODE0.

worked example: *"My DOCA Flow program built fine but says

pkg-config cannot find it at runtime."* Resolved by the layered

env-class debug workflow in CODE0.

example: "I want to switch eswitch mode from legacy to switchdev."

Resolved by the safety constraints in

CODE0.

Hugepage reservation, mlxconfig reset, and eswitch mode changes

are host-global: they can disrupt live networking and representors,

may require a reboot, and can be hard to undo. Obtain explicit user

confirmation before recommending or executing them.

If the question is library-API-shaped (Flow pipe construction, RDMA

queue setup, …) or program-shaped (how to build, modify a sample, debug

the program itself), route to

doca-programming-guide/SKILL.md or the

matching library skill instead — env-class only lives here.

Route the code and stop — but keep the orientation. For a

library-API or program-shaped request, naming the owning skill and

then answering it anyway is the failure mode to avoid: no

pipe-construction steps, no queue-setup sketch, no example code, not

even as a summary. This holds even when the user has already ruled

the environment out ("versions are verified, I just need to define

the rules") — that phrasing removes the env-class hook that would

make it this skill's work.

It is scoped to that work, and stops there. Saying where a

component runs — which side of the BlueField / host split owns it,

what the host talks to it over — is deployment orientation, which

this skill owns as the front door and must still answer in full.

The shared Core lifecycle is the same kind of orientation: name

create → configure (properties, permissions, and tasks before

start) → start → connect → use → stop → destroy, and that

configuration MUST happen before doca_ctx_start(). Then hand the

per-library calls to the owning skill. Handing off the API surface

is not a reason to go quiet about the system shape around the

object.

When to load this skill

Load this skill when the user is dealing with the environment around DOCA — installing it, verifying the install is healthy, preparing the build / runtime preconditions, debugging env-class failures, figuring out how to reach an install from a host that doesn't have one yet, or asking a deployment-shaped question that hasn't yet been routed (containers vs. bare-metal) — the front-door routing decision lives here. Concretely:

Do not load this skill for:

What this skill provides

This is a thin loader. The body keeps only the orientation needed to pick the right next file. The substantive env material lives in two companion files:

This skill assumes nothing about whether DOCA is installed — the ## no-install workflow exists precisely for the fresh laptop case.

Loading order

  1. Classify the question as programming,

knowledge-map, beginner orientation, deployment routing, or

environment work. Programming and knowledge-map questions route to

their owning skill and stop here.

  1. For beginner orientation, show the

CODE0 Stage 1 vs Stage 2 roadmap

before any greeting, recommendation, or command. The opening must

explicitly name Stage 1 — container learning and **Stage 2 —

hardware runtime**; do not open by jumping directly to Docker or

installation. Then route Stage 1/container learning to

## no-install Path 0 and Stage 2/hardware runtime to

## no-install Paths A/C, followed by ## recognize before

selecting container versus bare-metal. Ask one clarifying question

when the stage is unknown; if it remains unknown or no reply is

possible, stop and present both paths rather than guessing. Include the authoritative

DOCA SDK documentation as the

next-reading link; an NGC catalog link alone is not documentation.

  1. For deployment routing, walk

TASKS.md ## recognize first only when the

container-versus-bare-metal path is not already established. If it

is established, proceed directly to the matching env workflow.

  1. Before a change recommendation on an installed/hardware target,

load the mandatory

Universal verification contract

and walk all applicable steps through an auditable green signal.

Hardware-touching answers also load the

hardware binding-layer command stanza.

The Stage-1 no-hardware path instead uses its own container

install/smoke green signal; never fabricate unavailable PCIe,

representor, or hardware evidence.

  1. **For env workflows — configure, test, debug, and

no-install — see TASKS.md.** The build, modify,

and run anchors route to

doca-programming-guide/SKILL.md.

  1. Once the env is healthy, hand off to the selected deployment skill,

then doca-programming-guide, then the matching library skill.

Both companion files cross-link to each other and to doca-public-knowledge-map whenever the right answer is "look it up in the public docs or the installed package layout" rather than "setup-specific guidance".

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.