Skip to content

ObjectDetectionCoral stops working when restarting the docker container. #7

Open
@mikegleasonjr

Description

@mikegleasonjr

Area of Concern

  • Server
  • Behaviour of ObjectDetectionCoral
  • Installer
  • Runtime [e.g. Python3.7, .NET]
  • Module packages [e.g. PyTorch)
  • Something else

Describe the bug

  1. I am running a docker container with the codeproject/ai-server image with 2 volumes (so that I can restart it without having to reinstall/reconfigure everything):
  • /etc/codeproject/ai
  • /app/modules
  1. I installed the Object Detection (Coral) module, which worked fine with my TPU. I called the API and verified that everything was working.
  2. I stopped the container
  3. I started back the container
  4. The module now has this error: objectdetection_coral_adapter.py: An exception occurred initialising the module: libedgetpu.so.1: cannot open shared object file: No such file or dir

Expected behavior
The module restarts properly in the docker container.

I know what the problem actually is: In ObjectDetectionCoral/install.sh, there is a line to copy the shared library in /usr/lib/x86_64-linux-gnu/ upon module installation:

cp "${moduleDirPath}/edgetpu_runtime/${edgetpu_folder}/k8/libedgetpu.so.1.0" "/usr/lib/x86_64-linux-gnu/libedgetpu.so.1.0"

Obvisouly when restarting the container, this change is lost since I do not mount /usr/lib/x86_64-linux-gnu/ as a volume to be persistent across "reboots".

I don't know if modules have a startup hook where these steps of copying the shared object and running of ldconfig could be done there?

Screenshots
N/A

Your System (please complete the following information):

  • CodeProject.AI Server version: codeproject/ai-server:2.6.2
  • Object Detection (Coral) version: 2.2.0

Additional context
See Expected behavior

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions