Building an image with vpi

I am trying to build an docker image with a VPI install (from VPI - Vision Programming Interface: Install VPI in Docker) but during the build process I get the following error:

 => ERROR [12/16] RUN dpkg --configure pva-allow-2                                                                               0.5s
------
 > [12/16] RUN dpkg --configure pva-allow-2:
0.402 dpkg: error processing package pva-allow-2 (--configure):
0.402  package pva-allow-2 is already installed and configured
0.429 Errors were encountered while processing:
0.429  pva-allow-2
------
Dockerfile:24
--------------------
  22 |     RUN apt-get install pva-allow-2 -y || true
  23 |     RUN rm /var/lib/dpkg/info/pva-allow-2.post*
  24 | >>> RUN dpkg --configure pva-allow-2
  25 |     
  26 |     # Install VPI
--------------------
ERROR: failed to solve: process "/bin/sh -c dpkg --configure pva-allow-2" did not complete successfully: exit code: 1
Failed to deploy 'vpi:test Dockerfile: Dockerfile': Image build failed with exit code 1.

and my dockerfile is the following:

FROM nvcr.io/nvidia/l4t-ml:r36.2.0-py3

WORKDIR /usr/src/app
ENV PYTHONPATH=/usr/src/app

# Install packages required by add-apt-repository
RUN apt-get update
RUN apt-get install gnupg software-properties-common -y

# Add Jetson public APT repository
RUN apt-key adv --fetch-key https://repo.download.nvidia.com/jetson/jetson-ota-public.asc
RUN add-apt-repository 'deb https://repo.download.nvidia.com/jetson/common r36.4 main'

# Install VPI depedencies
RUN apt-get update
RUN apt-get install libnpp-12-6 libcufft-12-6 cuda-cudart-12-6 libegl1-mesa -y

# Add CUDA packages to library path
RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.6/targets/aarch64-linux/lib/

# This is a temporary workaround required to install pva-allow-2 in docker which will not be necessary next release
RUN apt-get install pva-allow-2 -y || true
RUN rm /var/lib/dpkg/info/pva-allow-2.post*
#RUN dpkg --configure pva-allow-2

# Install VPI
RUN apt-get install libnvvpi3 vpi3-dev vpi3-samples -y

# If VPI python packages are also installed, Install numpy
RUN apt-get install python3-pip -y
RUN python3.10 -m pip install numpy

COPY . .

Hi,

Could you try with the base image that was built for r36.4 BSP?

For example nvcr.io/nvidia/12.6.11-devel:12.6.11-devel-aarch64-ubuntu22.04

Thanks.

Hi,
Thank you very much for your help!
I tested around and the image nvcr.io/nvidia/l4t-jetpack:r36.4.0 worked for my needs.

For my own future reference, where can I find information on which image might support a needed package?

Thanks

Hi,

Usually, you can find the l4t base image by searching the l4t keyword.

Then you will need to find one that is built with the same BSP to avoid the compatibility issue.
For example: l4t-jetpack:r36.4.0 for JetPack 6.2/6.1.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.