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 . .