Inference Builder is a tool that automatically generates inference pipelines and integrates them into either a microservice or a standalone application. It takes an inference configuration file and an OpenAPI specification (when integrated with an HTTP server) as inputs, and may also require custom code snippets in certain cases.
The output of the tool is a Python package that can be used to build a microservice container image with a customized Dockerfile.

The Inference Builder consists of three major components:
Visit our documentation for more details:
First, be sure your system meets the requirement.
| Operating System | Python | CPU | GPU1 |
|---|---|---|---|
| Ubuntu 24.04 | 3.12 | x86, aarch64 | Nvidia ADA, Hopper, Blackwell |
Next, follow these steps to get started:
sudo apt update
sudo apt install protobuf-compiler
sudo apt install python3.12-venv python3.12-dev
Docker environment must be properly set up with below packages for building and running the examples:
Ensure nvidia runtime added to /etc/docker/daemon.json to run GPU-enabled containers
{
"runtimes": {
"nvidia": {
"args": [],
"path": "nvidia-container-runtime"
}
}
}
The docker group must exist in your system, please check if it has been created using getent group docker. Your current user must belong to the docker group, If not, run the command below, then log out and back in for the group change to take effect.
sudo usermod -aG docker $USER
Note for TEGRA users: If you're using a TEGRA device, you'll also need to install the Docker buildx plugin:
sudo apt install docker-buildx
Note for Jetson Orin users: External storage integration is required to support the execution of the DeepStream microservice on the Jetson Orin platform.
Download and install the NGC CLI from the NGC page and follow the NGC CLI Guide to set up the tool.
git clone https://github.com/NVIDIA-AI-IOT/inference_builder
cd inference_builder
git submodule update --init --recursive
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
Now you can try our examples to learn more. These examples span all supported backends and demonstrate their distinct inference flows.

Compared to manually crafting inference source code, Inference Builder offers developers the following advantages:
Inference Builder includes MCP (Model Context Protocol) integration, enabling AI-assisted pipeline generation directly within Cursor or Claude Code. With MCP, you can use natural language to generate inference pipelines, build Docker images, and explore sample configurations.
For detailed tool reference and advanced usage, see mcp/README-MCP.md.
Before setting up MCP, ensure you have completed the Getting Started steps above.
Ensure that you are in the repository's root directory.
Use the provided management script from the repository root:
# Start (runs in background)
MCP_API_KEY=MY_SECRET ./mcp/server_manager.sh start --port 8000
# Check status
./mcp/server_manager.sh status
# Tail logs
./mcp/server_manager.sh logs
# Stop
./mcp/server_manager.sh stop
Omit MCP_API_KEY to allow unauthenticated access. Use --workspace-root to set a custom directory for per-session workspaces.
Add the following to ~/.cursor/mcp.json (global) or <project>/.cursor/mcp.json (project-specific):
{
"mcpServers": {
"deepstream-inference-builder": {
"url": "http://<host>:8000/mcp",
"headers": { "Authorization": "Bearer MY_SECRET" }
}
}
}
Then navigate to File > Preferences > Cursor Settings > MCP. A green status icon next to deepstream-inference-builder confirms the connection:

Run the following command to register the server:
# With MCP_API_KEY enabled on the server
export MCP_API_KEY=MY_SECRET
codex mcp add deepstream-inference-builder \
--url http://<host>:8000/mcp \
--bearer-token-env-var MCP_API_KEY
# Without MCP_API_KEY
codex mcp add deepstream-inference-builder \
--url http://<host>:8000/mcp
Verify the connection is configured:
codex mcp list
Run the following command to register the server:
# User-level (available in all projects)
claude mcp add --transport http --scope user \
deepstream-inference-builder http://<host>:8000/mcp \
--header "Authorization: Bearer MY_SECRET"
# Project-level
claude mcp add --transport http --scope project \
deepstream-inference-builder http://<host>:8000/mcp \
--header "Authorization: Bearer MY_SECRET"
Omit --header if no API key was set on the server. Then verify the connection by running /mcp in the Claude Code console:
❯ deepstream-inference-builder · ✔ connected
Invoke the tools by mentioning "deepstream inference builder" in your prompt:
| Tool | Description |
|---|---|
generate_inference_pipeline | Generate inference pipelines from YAML configuration files |
build_docker_image | Build Docker images from generated pipelines |
docker_run_image | Run Docker images for testing and troubleshooting |
prepare_model_repository | Download models from NGC or HuggingFace and prepare repositories |
generate_nvinfer_config | Generate DeepStream nvinfer runtime configuration files |
| Resource | Description |
|---|---|
docs://README.md | Project documentation |
docs://mcp/README-MCP.md | MCP integration documentation |
schema://config.schema.json | Configuration schema reference |
samples://config/* | Sample pipeline configurations |
samples://dockerfile/* | Sample Dockerfiles |
samples://processor/* | Sample preprocessors and postprocessors |
You can now try out the example prompts using either Cursor or Claude Code.
Inference Builder also supports Agent Skills, letting agents such as Claude and Codex load domain-specific guidance for generating and testing inference pipelines.
The Agent Skill includes:
.skill_config: Auto-generated config with project root path, venv activation, and CLI entry pointThe skill directs agents to use the Inference Builder CLI (builder/main.py) directly, discovering available commands and flags via --help at runtime.
Install the skill to Claude's default skills directory:
cd skills
./setup_skill.sh --agent claude
This installs the skill to ~/.claude/skills/inference-builder/.
Install the skill to Codex's default skills directory:
cd skills
./setup_skill.sh --agent codex
This installs the skill to ${CODEX_HOME:-~/.codex}/skills/inference-builder/.
To install into a project or agent home:
./setup_skill.sh --agent claude /path/to/your/project
# → Creates /path/to/your/project/.claude/skills/inference-builder/
./setup_skill.sh --agent codex /path/to/your/codex-home
# → Creates /path/to/your/codex-home/skills/inference-builder/
For Codex custom homes, launch Codex with the same CODEX_HOME value so it discovers the installed skill.
For detailed skill documentation, see skills/inference-builder/SKILL.md.
You can now try out the example prompts using Claude Code.
Contributions are welcome! Please feel free to submit a PR.
The project is under active development and the following features are expected to be supported in the near future:
If you only generate the inference pipeline without running it, no GPU is required. ↩
Python
91.1%
Shell
4.5%
Dockerfile
3.5%
Inference Builder is a tool that automatically generates inference pipelines and integrates them into either a microservice or a standalone application. It takes an inference configuration file and an OpenAPI specification (when integrated with an HTTP server) as inputs, and may also require custom code snippets in certain cases.
The output of the tool is a Python package that can be used to build a microservice container image with a customized Dockerfile.

The Inference Builder consists of three major components:
Visit our documentation for more details:
First, be sure your system meets the requirement.
| Operating System | Python | CPU | GPU1 |
|---|---|---|---|
| Ubuntu 24.04 | 3.12 | x86, aarch64 | Nvidia ADA, Hopper, Blackwell |
Next, follow these steps to get started:
sudo apt update
sudo apt install protobuf-compiler
sudo apt install python3.12-venv python3.12-dev
Docker environment must be properly set up with below packages for building and running the examples:
Ensure nvidia runtime added to /etc/docker/daemon.json to run GPU-enabled containers
{
"runtimes": {
"nvidia": {
"args": [],
"path": "nvidia-container-runtime"
}
}
}
The docker group must exist in your system, please check if it has been created using getent group docker. Your current user must belong to the docker group, If not, run the command below, then log out and back in for the group change to take effect.
sudo usermod -aG docker $USER
Note for TEGRA users: If you're using a TEGRA device, you'll also need to install the Docker buildx plugin:
sudo apt install docker-buildx
Note for Jetson Orin users: External storage integration is required to support the execution of the DeepStream microservice on the Jetson Orin platform.
Download and install the NGC CLI from the NGC page and follow the NGC CLI Guide to set up the tool.
git clone https://github.com/NVIDIA-AI-IOT/inference_builder
cd inference_builder
git submodule update --init --recursive
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
Now you can try our examples to learn more. These examples span all supported backends and demonstrate their distinct inference flows.

Compared to manually crafting inference source code, Inference Builder offers developers the following advantages:
Inference Builder includes MCP (Model Context Protocol) integration, enabling AI-assisted pipeline generation directly within Cursor or Claude Code. With MCP, you can use natural language to generate inference pipelines, build Docker images, and explore sample configurations.
For detailed tool reference and advanced usage, see mcp/README-MCP.md.
Before setting up MCP, ensure you have completed the Getting Started steps above.
Ensure that you are in the repository's root directory.
Use the provided management script from the repository root:
# Start (runs in background)
MCP_API_KEY=MY_SECRET ./mcp/server_manager.sh start --port 8000
# Check status
./mcp/server_manager.sh status
# Tail logs
./mcp/server_manager.sh logs
# Stop
./mcp/server_manager.sh stop
Omit MCP_API_KEY to allow unauthenticated access. Use --workspace-root to set a custom directory for per-session workspaces.
Add the following to ~/.cursor/mcp.json (global) or <project>/.cursor/mcp.json (project-specific):
{
"mcpServers": {
"deepstream-inference-builder": {
"url": "http://<host>:8000/mcp",
"headers": { "Authorization": "Bearer MY_SECRET" }
}
}
}
Then navigate to File > Preferences > Cursor Settings > MCP. A green status icon next to deepstream-inference-builder confirms the connection:

Run the following command to register the server:
# With MCP_API_KEY enabled on the server
export MCP_API_KEY=MY_SECRET
codex mcp add deepstream-inference-builder \
--url http://<host>:8000/mcp \
--bearer-token-env-var MCP_API_KEY
# Without MCP_API_KEY
codex mcp add deepstream-inference-builder \
--url http://<host>:8000/mcp
Verify the connection is configured:
codex mcp list
Run the following command to register the server:
# User-level (available in all projects)
claude mcp add --transport http --scope user \
deepstream-inference-builder http://<host>:8000/mcp \
--header "Authorization: Bearer MY_SECRET"
# Project-level
claude mcp add --transport http --scope project \
deepstream-inference-builder http://<host>:8000/mcp \
--header "Authorization: Bearer MY_SECRET"
Omit --header if no API key was set on the server. Then verify the connection by running /mcp in the Claude Code console:
❯ deepstream-inference-builder · ✔ connected
Invoke the tools by mentioning "deepstream inference builder" in your prompt:
| Tool | Description |
|---|---|
generate_inference_pipeline | Generate inference pipelines from YAML configuration files |
build_docker_image | Build Docker images from generated pipelines |
docker_run_image | Run Docker images for testing and troubleshooting |
prepare_model_repository | Download models from NGC or HuggingFace and prepare repositories |
generate_nvinfer_config | Generate DeepStream nvinfer runtime configuration files |
| Resource | Description |
|---|---|
docs://README.md | Project documentation |
docs://mcp/README-MCP.md | MCP integration documentation |
schema://config.schema.json | Configuration schema reference |
samples://config/* | Sample pipeline configurations |
samples://dockerfile/* | Sample Dockerfiles |
samples://processor/* | Sample preprocessors and postprocessors |
You can now try out the example prompts using either Cursor or Claude Code.
Inference Builder also supports Agent Skills, letting agents such as Claude and Codex load domain-specific guidance for generating and testing inference pipelines.
The Agent Skill includes:
.skill_config: Auto-generated config with project root path, venv activation, and CLI entry pointThe skill directs agents to use the Inference Builder CLI (builder/main.py) directly, discovering available commands and flags via --help at runtime.
Install the skill to Claude's default skills directory:
cd skills
./setup_skill.sh --agent claude
This installs the skill to ~/.claude/skills/inference-builder/.
Install the skill to Codex's default skills directory:
cd skills
./setup_skill.sh --agent codex
This installs the skill to ${CODEX_HOME:-~/.codex}/skills/inference-builder/.
To install into a project or agent home:
./setup_skill.sh --agent claude /path/to/your/project
# → Creates /path/to/your/project/.claude/skills/inference-builder/
./setup_skill.sh --agent codex /path/to/your/codex-home
# → Creates /path/to/your/codex-home/skills/inference-builder/
For Codex custom homes, launch Codex with the same CODEX_HOME value so it discovers the installed skill.
For detailed skill documentation, see skills/inference-builder/SKILL.md.
You can now try out the example prompts using Claude Code.
Contributions are welcome! Please feel free to submit a PR.
The project is under active development and the following features are expected to be supported in the near future:
If you only generate the inference pipeline without running it, no GPU is required. ↩
Python
91.1%
Shell
4.5%
Dockerfile
3.5%