DPL Installation Guide
The DPL Development Container (dpl_dev) bundles several tools for compiling, controlling, and debugging DPL programs.
First, select and pull the appropriate container tag that matches the DOCA version you intend to use. You can find available releases at NVIDIA DOCA DPL Container Tags.
docker pull nvcr.io/nvidia/doca/dpl_dev:X.X.X-docaX.X.X-host
We'll use nvcr.io/nvidia/doca/dpl_dev:1.4.0-doca3.3.0-host for all examples in this page.
Running the container requires a set of base docker run options to work as intended.
Most use cases involve in extending the base options, for example adding mounts to files the tools interact with. We recommend to first understand the base options before you extend them with your own.
docker run -it -e HOME=${HOME} -v ${HOME}:${HOME} -u $(id -u):$(id -g) nvcr.io/nvidia/doca/dpl_dev:1.4.0-doca3.3.0-host install
The options file
The installation creates an options file at ~/dpl.opts which contains options to be passed to the docker run command running the container.
Removing any of the default options is not recommended.
However adding more options may be needed per your use case, the options file contain commented out examples of such use cases.
docker run -it -e HOME=${HOME} -v ${HOME}:${HOME} -u $(id -u):$(id -g) nvcr.io/nvidia/doca/dpl_dev:1.4.0-doca3.3.0-host uninstall
Running dpl requires access to docker so either run it with user root or with non-root user that is part of the docker group.
Running the installed dpl executes a CLI with commands of the bundled developer tools.
dpl --help
dpl - DPL Development and Runtime CLI
Usage:
dpl COMMAND
dpl [COMMAND] --help | -h
dpl --version | -v
Commands:
compile Runs the DPL NVP4 Compiler (alias command: nvp4c)
admin Runs the DPL Admin
nspect Runs the DPL Nspect
debugger Runs the DPL Debugger
p4runtime_sh Runs the P4Runtime Shell
Options:
--help, -h
Show this help
--version, -v
Show version number
Environment Variables:
DPL_COMPILE_DEFAULT_ARGS
Default arguments for the DPL Compile command
DPL_ADMIN_DEFAULT_ARGS
Default arguments for the DPL Admin command
DPL_NSPECT_DEFAULT_ARGS
Default arguments for the DPL Nspect command
DPL_DEBUGGER_DEFAULT_ARGS
Default arguments for the DPL Debugger command
DPL_P4RUNTIME_SHELL_DEFAULT_ARGS
Default arguments for the P4Runtime Shell command
Using the CLI is self explanatory, use the --help flag for further help on each command. For example, dpl compile --help will show the compiler tool's usage and full help message.
The environment variables DPL_..._DEFAULT_ARGS should be defined in the options file, a commented out template already exists.
Compiling DPL Applications that you wish to examine using the developer tools.
Loading DPL Applications can now be done with the compilation outputs.
Use the DOCA Pipeline Language Developer Tools to further examine the DPL programs correct operation.