Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: [OpenVino:] Intel compute runtime required for Frigate #12266

Closed
NickM-27 opened this issue Jul 2, 2024 Discussed in #12260 · 26 comments
Closed

[Bug]: [OpenVino:] Intel compute runtime required for Frigate #12266

NickM-27 opened this issue Jul 2, 2024 Discussed in #12260 · 26 comments
Labels
bug Something isn't working pinned

Comments

@NickM-27
Copy link
Collaborator

NickM-27 commented Jul 2, 2024

Discussed in #12260

Originally posted by Redsandro July 2, 2024

Describe the problem you are having

When starting from scratch:

  • new hardware
  • latest Proxmox 8.2
  • latest Ubuntu 24.04 LXC
  • latest Frigate 0.14.0-beta3

.. the OpenVino detector does not work with the Intel iGPU until the latest Intel Compute Runtime is installed inside the Frigate container:

docker exec -ti frigate bash
cd $(mktemp -d)

wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.16900.23/intel-igc-core_1.0.16900.23_amd64.deb
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.16900.23/intel-igc-opencl_1.0.16900.23_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/24.22.29735.20/intel-level-zero-gpu_1.3.29735.20_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/24.22.29735.20/intel-opencl-icd_24.22.29735.20_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/24.22.29735.20/libigdgmm12_22.3.19_amd64.deb

dpkg -i *.deb

I am aware that none of the maintainers use OpenVino. The problem and the solution have been observed by myself and at least one other person.

If I understand correctly, Intel Compute is a dependency for OpenVino in Frigate, and it needs to be updated to the latest version in order to use the latest kernel.

I did a search and believe this is not being tracked as a bug yet. My apologies if I missed something.

Steps to reproduce

  1. Freshen your image (i.e. docker compose down && docker compose up -d)
  2. Observe crash (e.g. docker compose logs -f --tail=100)
    [GPU] Context was not initialized for 0 device
  3. Change detector device to CPU in config
  4. Bring up new config (e.g. docker compose restart)
  5. Observe no crash
  6. Install latest Intel Compute Runtime (see above)
  7. Change detector device back to GPU in config
  8. Bring up new config (e.g. docker compose restart)
  9. Observe no crash

Version

0.14.0-beta3

Frigate config file

# https://docs.frigate.video/configuration/detectors
detectors:
  ov:
    type: openvino
    device: GPU
    model:
      path: /openvino-model/ssdlite_mobilenet_v2.xml

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

Relevant log output

Process detector:ov:
Traceback (most recent call last):
  File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
    object_detector = LocalObjectDetector(detector_config=detector_config)
  File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
    self.detect_api = create_detector(detector_config)
  File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
    return api(detector_config)
  File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 38, in __init__
    self.interpreter = self.ov_core.compile_model(
  File "/usr/local/lib/python3.9/dist-packages/openvino/runtime/ie_api.py", line 521, in compile_model
    super().compile_model(model, device_name, {} if config is None else config),
RuntimeError: Exception from src/inference/src/cpp/core.cpp:123:
Exception from src/inference/src/dev/plugin.cpp:59:
Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:204:
[GPU] Context was not initialized for 0 device

Operating system

Proxmox

Install method

Docker Compose

Network connection

Wired

Camera make and model

irrelevant

Any other information that may be helpful

This is relevant for both Ubuntu 22.04 and 24.04.

Running dpkg -i *.deb above throws an error or two due to certain packages already being installed, but these can safely be ignored. Here is a fix for one package, but I didn't use it.

Added: I thought I was creating an issue but the issue wizard redirected this back to discussions.
At least it has the bug label now. 🙂

@johnmmcgee

This comment was marked as off-topic.

@NickM-27

This comment was marked as off-topic.

@johnmmcgee

This comment was marked as off-topic.

@NickM-27

This comment was marked as off-topic.

@johnmmcgee

This comment was marked as off-topic.

@NickM-27

This comment was marked as off-topic.

@DeltaTango69
Copy link

Unfortunately I have the same problem. Before Update to Ver. 14 ist was no problem.
The installation of the intel compute runtime seems not to work to me. I am under windows with WSL. Maybe therefore it didn't work. Any Suggestion?

Logs:
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.210531266  Traceback (most recent call last):
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.211113110    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.211115810      self.run()
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.212769335    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.212773135      self._target(*self._args, **self._kwargs)
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.213745609    File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.213749109      object_detector = LocalObjectDetector(detector_config=detector_config)
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.215159116    File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.215162516      self.detect_api = create_detector(detector_config)
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216579323    File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216742436      return api(detector_config)
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216791740    File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 43, in __init__
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216793740      self.interpreter = self.ov_core.compile_model(
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216822142    File "/usr/local/lib/python3.9/dist-packages/openvino/runtime/ie_api.py", line 521, in compile_model
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216824142      super().compile_model(model, device_name, {} if config is None else config),
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216898248  RuntimeError: Exception from src/inference/src/cpp/core.cpp:123:
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216900248  Exception from src/inference/src/dev/plugin.cpp:59:
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216901848  Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:204:
2024-08-21 17:32:38 frigate  | 2024-08-21 15:32:38.216906148  [GPU] Context was not initialized for 0 device

@DeltaTango69

This comment has been minimized.

@wernerb
Copy link

wernerb commented Aug 23, 2024

The problem occurs for me as well. Unfortunately because I am on Kubernetes I cannot persist container filesystem changes easily so that workaround is not really feasible.

The environment variable workaround also does not work.

This is on 24.04 and I tested multiple mainline kernels 5.8.0 6.8.0, 6.8.12 all with the same result.
I am running a Skylake Intel CPU and openvino with auto used to work correctly with 0.13.

Is there an image that has these commands run on the container available? Would a PR that modifies the image with these commands (with errors fixed) be the proper solution or is this a bug that's expected to be solved upstream?

@NickM-27
Copy link
Collaborator Author

@DeltaTango69 this does not seem like the issue discussed here, what is your docker config

@wernerb The issue that this is referring to will be fixed upstream, but from your description it is not clear if you are actually experiencing the issue being discussed here

@DeltaTango69

This comment has been minimized.

@NickM-27
Copy link
Collaborator Author

It's about a specific error message that occurs due to this missing package. You should make your own support request

@DeltaTango69
Copy link

It's about a specific error message that occurs due to this missing package. You should make your own support request

As I understand this is only a temporary solution.The solution should be in my opinion the integration of the new openvino update in the frigate image.

@fouticus
Copy link

fouticus commented Sep 3, 2024

I'm unclear on how to apply the temporary solution. The stable image uses Debian 11, which doesn't have zst support, so I get an error when trying to install the intel compute runtime: e.g. I get the error message:

dpkg-deb: error: archive 'libigdgmm12_22.3.19_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up

Am I missing something obvious? I'm running the container inside Ubuntu 22.04 w/ Meteor-Lake (Intel Core 5 Ultra)

docker-compose.yml:

services:
  frigate:
    devices:
      - /dev/dri/:/dev/dri/ # For intel hwaccel, needs to be updated for your hardware
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: always
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "64mb" # update for your cameras based on calculation above
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/frigate_user/frigate_docker/config:/config
      - /home/frigate_user/media/Security/frigate:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "8971:8971"
      # - "5000:5000" # Internal unauthenticated access. Expose carefully.
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      FRIGATE_RTSP_PASSWORD: <secret>

frigate config.yml:

mqtt:
  enabled: false

#detectors:
#  npu_detector:
#    type: openvino
#    device: GPU

#model: 
#  width: 300
#  height: 300
#  input_tensor: nhwc
#  input_pixel_format: bgr
#  path: /openvino-model/ssdlite_mobilenet_v2.xml
#  labelmap_path: /openvino-model/coco_91cl_bkgr.txt


logger:
  default: info

ffmpeg:
  global_args: -hide_banner -loglevel info
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128

cameras:
  duck_enclosure_1: # <------ Name the camera
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://<user>:<secret>@<ip>/Preview_01_sub
          roles:
            - detect
            - audio
        - path: rtsp://<user>:<secret>@<ip>/Preview_01_main
          roles:
            - record
    detect:
      enabled: true # <---- disable detection until you have a working camera feed
      width: 1280
      height: 720
version: 0.14

@github59173
Copy link

Same problem, different install. AMD CPU, Intel ARC 380 GPU.
Using the helper script installed fine Frigate 14.1 LXC (default settings), CPU is used as detector but when switching to the GPU it errors out.
Error:
"
2024-09-03 15:02:36.064242 Process detector:ov:
2024-09-03 15:02:36.065743 Traceback (most recent call last):
2024-09-03 15:02:36.065764 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-09-03 15:02:36.065779 self.run()
2024-09-03 15:02:36.065794 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-09-03 15:02:36.065808 self._target(*self._args, **self._kwargs)
2024-09-03 15:02:36.065823 File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2024-09-03 15:02:36.065837 object_detector = LocalObjectDetector(detector_config=detector_config)
2024-09-03 15:02:36.065851 File "/opt/frigate/frigate/object_detection.py", line 53, in init
2024-09-03 15:02:36.065865 self.detect_api = create_detector(detector_config)
2024-09-03 15:02:36.065880 File "/opt/frigate/frigate/detectors/init.py", line 18, in create_detector
2024-09-03 15:02:36.065894 return api(detector_config)
2024-09-03 15:02:36.065908 File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 43, in init
2024-09-03 15:02:36.065922 self.interpreter = self.ov_core.compile_model(
2024-09-03 15:02:36.065937 File "/usr/local/lib/python3.9/dist-packages/openvino/runtime/ie_api.py", line 543, in compile_model
2024-09-03 15:02:36.065951 super().compile_model(model, device_name, {} if config is None else config),
2024-09-03 15:02:36.065966 RuntimeError: Exception from src/inference/src/cpp/core.cpp:121:
2024-09-03 15:02:36.065980 Exception from src/inference/src/dev/plugin.cpp:58:
2024-09-03 15:02:36.065994 Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:205:
2024-09-03 15:02:36.066009 [GPU] Context was not initialized for 0 device
"
I have tried many suggested fixes but can't seem to get past this error. Has there be a definitive fix for this?

@mic-s
Copy link

mic-s commented Sep 4, 2024

@fouticus try to repack it with this script below.
I have done it on Ubuntu 24.04 in LXC container in proxmox with 6.8.4-2-pve kernel and with Intel arc a380, it is from memory so it could need some tweaks.
I suggest to create folder with packages to install in frigate docker in same folder as docker-compose.yml file such as packages. It allow to reinstall packages after recreation of container with ease, with onlu last steps (running bash in container and installing packages in container).
After that we have to add mount it in docker by adding to docker compose line in volumes section:
- ./packages:/media/packages
then we have to download packages to packages folder:

cd packages 
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-core_1.0.17384.11_amd64.deb
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-opencl_1.0.17384.11_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/intel-level-zero-gpu-dbgsym_1.3.30508.7_amd64.ddeb
wget https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/intel-level-zero-gpu_1.3.30508.7_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/intel-opencl-icd-dbgsym_24.31.30508.7_amd64.ddeb
wget https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/intel-opencl-icd_24.31.30508.7_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/libigdgmm12_22.4.1_amd64.deb

Now we have to repack packages that are packed with zst, I suggest to use script, copy it to file repack.sh
This script propably would need some packages to install

#!/bin/bash

# base on:
# https://gist.github.com/the-robot/c1ab9325c0a51736dc6cefab6737ba51

Original=$1
OriginalPath=$(realpath $Original)
Repackage=$Original     

cd $(mktemp -d)
cp $OriginalPath .
ar x $Original
zstd -d < control.tar.zst| xz > control.tar.xz
zstd -d < data.tar.zst| xz > data.tar.xz  
ar -m -c -a sdsd $Repackage debian-binary control.tar.xz data.tar.xz
rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst 
ls
mv $OriginalPath "${OriginalPath%.*}.deb_bckp"
mv $Repackage $(dirname "$OriginalPath")
realpath $Repackage

make it executable
chmod +x repack.sh
this script need installed zstd
apt install zstd
Now run to repack
./repack.sh libigdgmm12_22.4.1_amd64.deb
I am not sure it it is only package that need repacking, if there is more then you should repack them as well.
Next is to run bash in frigate docker:
docker exec -it frigate bash
and then install packages in docker:
cd /media/packages/; dpkg -i *.deb
this command if I remember correctly should be run twice.
Now after container restart it should be working.

@papaf76
Copy link

papaf76 commented Sep 20, 2024

Hi,
I tried using your method, unfortunately when trying to install the debs they all return this error:
dpkg-deb: error: file 'libigdgmm12_22.4.1_amd64.deb' is not a Debian binary archive (try dpkg-split?)
Since I'm running an Alpine LXC with docker I used your script into another Ubuntu 20.04 LXC to repack the debs.
Does it have to be 24.04?

Thanks

@ctml91
Copy link

ctml91 commented Sep 22, 2024

I tried to build a local container images with the workaround and running using that but it doesn't seem to be working for me, any ideas? when I switch device to CPU it works, and GPU usage shows in the container

image
2024-09-22 18:40:47.628280235  Traceback (most recent call last):
2024-09-22 18:40:47.628334587    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-09-22 18:40:47.628336372      self.run()
2024-09-22 18:40:47.628350667    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-09-22 18:40:47.628352233      self._target(*self._args, **self._kwargs)
2024-09-22 18:40:47.628364489    File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2024-09-22 18:40:47.628366007      object_detector = LocalObjectDetector(detector_config=detector_config)
2024-09-22 18:40:47.628377816    File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
2024-09-22 18:40:47.628379266      self.detect_api = create_detector(detector_config)
2024-09-22 18:40:47.628390949    File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2024-09-22 18:40:47.628392238      return api(detector_config)
2024-09-22 18:40:47.628403728    File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 43, in __init__
2024-09-22 18:40:47.628405123      self.interpreter = self.ov_core.compile_model(
2024-09-22 18:40:47.628417114    File "/usr/local/lib/python3.9/dist-packages/openvino/runtime/ie_api.py", line 521, in compile_model
2024-09-22 18:40:47.628418634      super().compile_model(model, device_name, {} if config is None else config),
2024-09-22 18:40:47.628443059  RuntimeError: Exception from src/inference/src/cpp/core.cpp:123:
2024-09-22 18:40:47.628444633  Exception from src/inference/src/dev/plugin.cpp:59:
2024-09-22 18:40:47.628445991  Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:204:
2024-09-22 18:40:47.628450325  [GPU] Context was not initialized for 0 device
2024-09-22 18:40:47.628451568

Dockerfile

FROM ghcr.io/blakeblackshear/frigate:0.14.1

RUN cd $(mktemp -d)
RUN wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.16900.23/intel-igc-core_1.0.16900.23_amd64.deb \
 https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.16900.23/intel-igc-opencl_1.0.16900.23_amd64.deb \
 https://github.com/intel/compute-runtime/releases/download/24.22.29735.20/intel-level-zero-gpu_1.3.29735.20_amd64.deb \
 https://github.com/intel/compute-runtime/releases/download/24.22.29735.20/intel-opencl-icd_24.22.29735.20_amd64.deb \
 https://github.com/intel/compute-runtime/releases/download/24.22.29735.20/libigdgmm12_22.3.19_amd64.deb
RUN dpkg -i *.deb || echo "done"

And I create the container using the local image, but it still throws the same error

$ podman build -f /tmp/Dockerfile -t localhost/frigate:local

@NickM-27
Copy link
Collaborator Author

This should be fixed in dev images

@ctml91
Copy link

ctml91 commented Sep 22, 2024

This should be fixed in dev images

Thanks, unfortunately it didn't help in my case.

ghcr.io/blakeblackshear/frigate:12e2c04-amd64

2024-09-22 18:53:29.300733214  Process detector:ov:
2024-09-22 18:53:29.303357869  Traceback (most recent call last):
2024-09-22 18:53:29.304195481    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-09-22 18:53:29.304199524      self.run()
2024-09-22 18:53:29.304229842    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-09-22 18:53:29.304231386      self._target(*self._args, **self._kwargs)
2024-09-22 18:53:29.304247272    File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2024-09-22 18:53:29.304248806      object_detector = LocalObjectDetector(detector_config=detector_config)
2024-09-22 18:53:29.304266972    File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
2024-09-22 18:53:29.304268407      self.detect_api = create_detector(detector_config)
2024-09-22 18:53:29.304282809    File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2024-09-22 18:53:29.304284138      return api(detector_config)
2024-09-22 18:53:29.304298460    File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 37, in __init__
2024-09-22 18:53:29.304299876      self.interpreter = self.ov_core.compile_model(
2024-09-22 18:53:29.304318638    File "/usr/local/lib/python3.9/dist-packages/openvino/runtime/ie_api.py", line 543, in compile_model
2024-09-22 18:53:29.304320166      super().compile_model(model, device_name, {} if config is None else config),
2024-09-22 18:53:29.304358465  RuntimeError: Exception from src/inference/src/cpp/core.cpp:121:
2024-09-22 18:53:29.304360088  Exception from src/inference/src/dev/plugin.cpp:58:
2024-09-22 18:53:29.304361478  Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:205:
2024-09-22 18:53:29.304363730  [GPU] Context was not initialized for 0 device
2024-09-22 18:53:29.304364919
2024-09-22 18:53:29.304365955
2024-09-22 18:53:29.304388587
2024-09-22 18:53:30.161154556  [INFO] Starting go2rtc healthcheck service...
2024-09-22 18:53:49.584643003  [2024-09-22 18:53:49] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting Frigate..
detectors:
  ov:
    type: openvino
    device: GPU
    model:
      path: /openvino-model/ssdlite_mobilenet_v2.xml
model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt
version: 0.15-0
root@6c4b6aa98750:/opt/frigate# ls -lth /dev/dri
total 0
crw-rw----. 1 root irc 226,   1 Sep 22 18:54 card1
crw-rw-rw-. 1 root 105 226, 128 Sep 22 18:54 renderD128

@NickM-27
Copy link
Collaborator Author

you might be seeing a different issue then, the latest dev builds have the latest libraries from intel as marked in the OP

@DeltaTango69
Copy link

I can confirm that openvino works - thank you!

@darnmason
Copy link

Any chance of getting a patch release on 0.14 for this?

Otherwise would there be a recommended most-stable dev image to use in the meantime?

@NickM-27
Copy link
Collaborator Author

No, it's a big change that requires beta testing

@darnmason
Copy link

darnmason commented Oct 8, 2024

Just wanted to note that I'm not experiencing this issue anymore after a kernel update in proxmox to 6.8.12-2.
I upgraded from 6.8.4-2.

@aeozyalcin
Copy link
Contributor

This should be fixed in dev images

Thanks, unfortunately it didn't help in my case.

ghcr.io/blakeblackshear/frigate:12e2c04-amd64

2024-09-22 18:53:29.300733214  Process detector:ov:
2024-09-22 18:53:29.303357869  Traceback (most recent call last):
2024-09-22 18:53:29.304195481    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-09-22 18:53:29.304199524      self.run()
2024-09-22 18:53:29.304229842    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-09-22 18:53:29.304231386      self._target(*self._args, **self._kwargs)
2024-09-22 18:53:29.304247272    File "/opt/frigate/frigate/object_detection.py", line 102, in run_detector
2024-09-22 18:53:29.304248806      object_detector = LocalObjectDetector(detector_config=detector_config)
2024-09-22 18:53:29.304266972    File "/opt/frigate/frigate/object_detection.py", line 53, in __init__
2024-09-22 18:53:29.304268407      self.detect_api = create_detector(detector_config)
2024-09-22 18:53:29.304282809    File "/opt/frigate/frigate/detectors/__init__.py", line 18, in create_detector
2024-09-22 18:53:29.304284138      return api(detector_config)
2024-09-22 18:53:29.304298460    File "/opt/frigate/frigate/detectors/plugins/openvino.py", line 37, in __init__
2024-09-22 18:53:29.304299876      self.interpreter = self.ov_core.compile_model(
2024-09-22 18:53:29.304318638    File "/usr/local/lib/python3.9/dist-packages/openvino/runtime/ie_api.py", line 543, in compile_model
2024-09-22 18:53:29.304320166      super().compile_model(model, device_name, {} if config is None else config),
2024-09-22 18:53:29.304358465  RuntimeError: Exception from src/inference/src/cpp/core.cpp:121:
2024-09-22 18:53:29.304360088  Exception from src/inference/src/dev/plugin.cpp:58:
2024-09-22 18:53:29.304361478  Check 'contexts.count(device_id)' failed at src/plugins/intel_gpu/src/plugin/plugin.cpp:205:
2024-09-22 18:53:29.304363730  [GPU] Context was not initialized for 0 device
2024-09-22 18:53:29.304364919
2024-09-22 18:53:29.304365955
2024-09-22 18:53:29.304388587
2024-09-22 18:53:30.161154556  [INFO] Starting go2rtc healthcheck service...
2024-09-22 18:53:49.584643003  [2024-09-22 18:53:49] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting Frigate..
detectors:
  ov:
    type: openvino
    device: GPU
    model:
      path: /openvino-model/ssdlite_mobilenet_v2.xml
model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt
version: 0.15-0
root@6c4b6aa98750:/opt/frigate# ls -lth /dev/dri
total 0
crw-rw----. 1 root irc 226,   1 Sep 22 18:54 card1
crw-rw-rw-. 1 root 105 226, 128 Sep 22 18:54 renderD128

@ctml91 what CPU do you have? I am having the same issue with J5005, even on the latest dev Frigate images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
None yet
Development

No branches or pull requests