google-coral / tflite

Examples using TensorFlow Lite API to run inference on Coral devices
https://coral.withgoogle.com
Apache License 2.0
181 stars 67 forks source link

Docker: dpkg: error processing archive /var/cache/apt/archives/libedgetpu1-max_14.1_armhf.deb #25

Closed mwkldeveloper closed 3 years ago

mwkldeveloper commented 4 years ago

I am trying to prepare docker image for coral

I can apt-get install libedgetpu1-std and run the demo successfully:

But when i try apt-get install libedgetpu1-max, it cause error:

Preconfiguring packages ...
(Reading database ... 14066 files and directories currently installed.)
Preparing to unpack .../libedgetpu1-max_14.1_armhf.deb ...
dpkg: error processing archive /var/cache/apt/archives/libedgetpu1-max_14.1_armhf.deb (--unpack):
 new libedgetpu1-max:armhf package pre-installation script subprocess returned error exit status 30
Errors were encountered while processing:
 /var/cache/apt/archives/libedgetpu1-max_14.1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Dockerfile:

FROM balenalib/raspberrypi3-debian:latest

RUN apt-get update

RUN apt-get install python3-pip

#Install tflite
RUN pip3 install https://dl.google.com/coral/python/tflite_runtime-2.1.0.post1-cp37-cp37m-linux_armv7l.whl

#Install edgetpu
RUN echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
RUN apt-get update
RUN apt-get install libedgetpu1-std
# RUN apt-get install libedgetpu1-max
Namburger commented 4 years ago

@mwkldeveloper I'll start as I always do for docker/vm issues by stating that we don't officially support this configurations. However, it's been known to be working so no harms there :)

I think the problem with installing the max frequencies is that we do requires a yes/no answer to the face that the device may heats up:

You're about to install the Edge TPU runtime that runs at the maximum operating frequency.

Warning: If you're using the Coral USB Accelerator, it may heat up during operation, depending on the computation workloads and operating frequency. Touching the metal part of the USB Accelerator after
it has been operating for an extended period of time may lead to discomfort and/or skin burns. As such, if you install the Edge TPU runtime using the maximum operating frequency, the USB Accelerator
should be operated at an ambient temperature of 25°C or less. (If you instead install the Edge TPU runtime using the reduced operating frequency, then the device is intended to safely operate at an
ambient temperature of 35°C or less.)

Google does not accept any responsibility for any loss or damage if the device is operated outside of the recommended ambient temperature range.

Continue to install the Edge TPU runtime that runs at the maximum operating frequency? [yes/no] yes

I'm not sure if there is a way to bypass that during docker build, my suggestion is to install the max frequencies inside the docker's shell

manoj7410 commented 3 years ago

Feel free to reopen if this is still an issue.

melyux commented 1 year ago

Trying to install this inside the Docker's shell, still getting the same error. I tried doing yes | sudo apt-get install libedgetpu1-max and even that doesn't work.