Understand the MPK Package
When you run mpk create
in the Palette environment, it generates a project.mpk
file. This file includes all necessary libraries, configurations, and models to run the pipeline.
Typically, you use mpk deploy
to deploy the package to the DevKit and execute it. However, during application development, you may need to integrate project.mpk
into a larger application and run it automatically without relying on the MPK tools. Understanding the structure of project.mpk
and how to incorporate it into your application is essential for seamless deployment.
Fundamentally, project.mpk
is a Zip archive that contains the following files and directories:
palette-user@palette-container-id:{project}$ file project.mpk
project.mpk: Zip archive data, at least v2.0 to extract, compression method=deflate
This file contains:
├── manifest.json
└── resources
└── installer.rpm
The installer.rpm
is the RPM package that can be installed directly on the DevKit using the rpm
command.
palette-user@palette-container-id:{project}$ file resources/installer.rpm
resources/installer.rpm: RPM v3.0 bin i386/x86_64
palette-user@palette-container-id:{project}$ rpm -qlp installer.rpm
/data
/data/simaai
/data/simaai/applications
/data/simaai/applications/resnet50_mpk
/data/simaai/applications/resnet50_mpk/bin
/data/simaai/applications/resnet50_mpk/bin/gst_app
/data/simaai/applications/resnet50_mpk/etc
/data/simaai/applications/resnet50_mpk/etc/detess_dequant.json
/data/simaai/applications/resnet50_mpk/etc/input_image720.rgb
/data/simaai/applications/resnet50_mpk/etc/mla.json
/data/simaai/applications/resnet50_mpk/etc/overlay.json
/data/simaai/applications/resnet50_mpk/etc/preproc.json
/data/simaai/applications/resnet50_mpk/lib
/data/simaai/applications/resnet50_mpk/lib/libgstsimaaiprocesscvu_new.so
/data/simaai/applications/resnet50_mpk/lib/libgstsimaaiprocessmla_new.so
/data/simaai/applications/resnet50_mpk/lib/libgstsimaaisrc.so
/data/simaai/applications/resnet50_mpk/lib/libsimple_overlay.so
/data/simaai/applications/resnet50_mpk/share
/data/simaai/applications/resnet50_mpk/share/process_mla
/data/simaai/applications/resnet50_mpk/share/process_mla/resnet50_stage1_mla.lm
You can include this RPM in your update package and implement scripts to handle its installation or upgrade during the application deployment process. Refer to this article to understand the pipeline launch command.