immich-machine-learning openvino not working (transcoding works) #3145

Closed
opened 2026-02-05 07:52:18 +03:00 by OVERLORD · 18 comments
Owner

Originally created by @Str1atum on GitHub (May 15, 2024).

The bug

Hi all,

I configured ubuntu in docker on Ubuntu 24.04 on a proxmox VM with PCIe passthrough for my Intel 13th gen Iris Xe
So far intel_gpu_top and hardware transcoding is working fine in immich (can see the utilization in intel_gpu_top and speed is fine) but I cannot get the ml part to use the GPU with openvino
The error in the logs is just:
WARNING No GPU device found in OpenVINO. Falling back to CPU

The OS that Immich Server is running on

Ubuntu 24.04

Version of Immich Server

v1.105.1

Version of Immich Mobile App

v1.105.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino
    extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
      file: hwaccel.ml.yml
      service: openvino # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: unless-stopped

Your .env content

standard .env. just with folders / passwords changed

Reproduction steps

see above

Relevant log output

WARNING No GPU device found in OpenVINO. Falling back to CPU

Additional information

No response

Originally created by @Str1atum on GitHub (May 15, 2024). ### The bug Hi all, I configured ubuntu in docker on Ubuntu 24.04 on a proxmox VM with PCIe passthrough for my Intel 13th gen Iris Xe So far intel_gpu_top and hardware transcoding is working fine in immich (can see the utilization in intel_gpu_top and speed is fine) but I cannot get the ml part to use the GPU with openvino The error in the logs is just: WARNING No GPU device found in OpenVINO. Falling back to CPU ### The OS that Immich Server is running on Ubuntu 24.04 ### Version of Immich Server v1.105.1 ### Version of Immich Mobile App v1.105.1 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration file: hwaccel.ml.yml service: openvino # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: unless-stopped ``` ### Your .env content ```Shell standard .env. just with folders / passwords changed ``` ### Reproduction steps ```bash see above ``` ### Relevant log output WARNING No GPU device found in OpenVINO. Falling back to CPU ### Additional information _No response_
Author
Owner

@mertalev commented on GitHub (May 16, 2024):

I'm guessing you're either missing a driver, or 24.04 is too new for the OpenVINO version in the container. Also, what model is the CPU? I last tested it on a 13700H.

@mertalev commented on GitHub (May 16, 2024): I'm guessing you're either missing a driver, or 24.04 is too new for the OpenVINO version in the container. Also, what model is the CPU? I last tested it on a 13700H.
Author
Owner

@Str1atum commented on GitHub (May 16, 2024):

It's i9-13900H

I tried with bookworm Debian 6.1 kernel but had no success at all.

@Str1atum commented on GitHub (May 16, 2024): It's i9-13900H I tried with bookworm Debian 6.1 kernel but had no success at all.
Author
Owner

@mertalev commented on GitHub (May 16, 2024):

Hmm, you can try looking at some of the drivers mentioned in this page. This page also suggests using --group-add. For Compose files, this would mean first running stat -c \"%g\" /dev/dri/render*, then adding the output as:

...
group_add:
  - <output>

Also, for what it's worth, I tested on Fedora.

@mertalev commented on GitHub (May 16, 2024): Hmm, you can try looking at some of the drivers mentioned in [this](https://docs.openvino.ai/2024/get-started/configurations/configurations-intel-gpu.html) page. [This](https://github.com/openvinotoolkit/docker_ci/blob/master/docs/accelerators.md) page also suggests using `--group-add`. For Compose files, this would mean first running `stat -c \"%g\" /dev/dri/render*`, then adding the output as: ``` ... group_add: - <output> ``` Also, for what it's worth, I tested on Fedora.
Author
Owner

@Str1atum commented on GitHub (May 16, 2024):

No success - driver installation went smooth but no changes.
And I added this to my hwaccel.ml.ml

openvino:
device_cgroup_rules:
- "c 189:* rmw"
devices:
- /dev/dri:/dev/dri
group_add:
- "993"
volumes:
- /dev/bus/usb:/dev/bus/usb

@Str1atum commented on GitHub (May 16, 2024): No success - driver installation went smooth but no changes. And I added this to my hwaccel.ml.ml openvino: device_cgroup_rules: - "c 189:* rmw" devices: - /dev/dri:/dev/dri group_add: - "993" volumes: - /dev/bus/usb:/dev/bus/usb
Author
Owner

@mertalev commented on GitHub (May 16, 2024):

What's the output of ls -l /dev/dri? Also, can you set LOG_LEVEL=debug, try again and find the line Available OpenVINO devices: in the ML logs?

@mertalev commented on GitHub (May 16, 2024): What's the output of `ls -l /dev/dri`? Also, can you set `LOG_LEVEL=debug`, try again and find the line `Available OpenVINO devices:` in the ML logs?
Author
Owner

@Str1atum commented on GitHub (May 16, 2024):

ls -l /dev/dri:

total 0
drwxr-xr-x 2 root root 100 May 16 14:49 by-path
crw-rw---- 1 root video 226, 0 May 16 14:49 card0
crw-rw---- 1 root video 226, 1 May 16 14:49 card1
crw-rw---- 1 root render 226, 128 May 16 14:49 renderD128

Screenshot 16 05 2024 um 18 39 04 PM

@Str1atum commented on GitHub (May 16, 2024): ls -l /dev/dri: > total 0 > drwxr-xr-x 2 root root 100 May 16 14:49 by-path > crw-rw---- 1 root video 226, 0 May 16 14:49 card0 > crw-rw---- 1 root video 226, 1 May 16 14:49 card1 > crw-rw---- 1 root render 226, 128 May 16 14:49 renderD128 ![Screenshot 16 05 2024 um 18 39 04 PM](https://github.com/immich-app/immich/assets/76776216/60470d36-e6f5-4edb-a845-97c4fe2e88a3)
Author
Owner

@mertalev commented on GitHub (May 16, 2024):

Can you also add the output of stat -c \"%g\" /dev/dri/card* to group_add? I think the OpenVINO image is non-root, so it may not be able to access the devices in /dev/dri.

@mertalev commented on GitHub (May 16, 2024): Can you also add the output of `stat -c \"%g\" /dev/dri/card*` to `group_add`? I think the OpenVINO image is non-root, so it may not be able to access the devices in `/dev/dri`.
Author
Owner

@Str1atum commented on GitHub (May 16, 2024):

Screenshot 16 05 2024 um 21 50 06 PM

Screenshot 16 05 2024 um 21 50 20 PM

but still the same error

Screenshot 16 05 2024 um 21 50 57 PM

@Str1atum commented on GitHub (May 16, 2024): ![Screenshot 16 05 2024 um 21 50 06 PM](https://github.com/immich-app/immich/assets/76776216/dac5784d-ea18-429a-a0a3-d6048b4207d8) ![Screenshot 16 05 2024 um 21 50 20 PM](https://github.com/immich-app/immich/assets/76776216/af51e473-d7cf-4607-81f2-5ff61fce1686) but still the same error ![Screenshot 16 05 2024 um 21 50 57 PM](https://github.com/immich-app/immich/assets/76776216/a6c20f3c-2959-4fd2-9e33-20515b13f2e1)
Author
Owner

@mertalev commented on GitHub (May 16, 2024):

Try adding this:

    environment:
      - NEOReadDebugKeys=1
      - OverrideGpuAddressSpace=48
@mertalev commented on GitHub (May 16, 2024): Try adding this: ```yaml environment: - NEOReadDebugKeys=1 - OverrideGpuAddressSpace=48 ```
Author
Owner

@Str1atum commented on GitHub (May 17, 2024):

that seems to have worked

Screenshot 16 05 2024 um 23 55 22 PM

@Str1atum commented on GitHub (May 17, 2024): that seems to have worked ![Screenshot 16 05 2024 um 23 55 22 PM](https://github.com/immich-app/immich/assets/76776216/bbea6428-921d-4fc1-874f-05e3331d55ad)
Author
Owner

@mertalev commented on GitHub (May 17, 2024):

Sweet! That means it's a bug in intel-compute-runtime.

@mertalev commented on GitHub (May 17, 2024): Sweet! That means it's a [bug](https://github.com/intel/compute-runtime/issues/710) in `intel-compute-runtime`.
Author
Owner

@Str1atum commented on GitHub (May 17, 2024):

So anything we can do about that or do I just need to keep that compose extension forever?

@Str1atum commented on GitHub (May 17, 2024): So anything we can do about that or do I just need to keep that compose extension forever?
Author
Owner

@mertalev commented on GitHub (May 17, 2024):

We would need the latest patched release for intel-compute-runtime in the image, which will take some time to be available in package managers. You can just keep those envs around until then.

@mertalev commented on GitHub (May 17, 2024): We would need the [latest patched release](https://github.com/intel/compute-runtime/releases/tag/24.13.29138.7) for `intel-compute-runtime` in the image, which will take some time to be available in package managers. You can just keep those envs around until then.
Author
Owner

@mertalev commented on GitHub (May 17, 2024):

I decided to add these to the hwaccel.ml.yml file in the meantime: #9541.

@mertalev commented on GitHub (May 17, 2024): I decided to add these to the `hwaccel.ml.yml` file in the meantime: #9541.
Author
Owner

@vuongtt92 commented on GitHub (May 22, 2024):

I added this to the openvino section in hwaccel.ml.yml but it still doesn't work. Mine is intel N5015 installing Xpenology 7.2. Could you please help? The log said "no gpu device found in openvino"
```
environment:
- NEOReadDebugKeys=1
- OverrideGpuAddressSpace=48

@vuongtt92 commented on GitHub (May 22, 2024): I added this to the openvino section in ` hwaccel.ml.yml` but it still doesn't work. Mine is intel N5015 installing Xpenology 7.2. Could you please help? The log said "no gpu device found in openvino" ``` environment: - NEOReadDebugKeys=1 - OverrideGpuAddressSpace=48 ```
Author
Owner

@mertalev commented on GitHub (May 22, 2024):

That fix only applies to kernels 6.7.5 or newer. I don't imagine a Synology server would have such a new kernel. It could be that the kernel is too old instead and/or that you're missing a driver.

@mertalev commented on GitHub (May 22, 2024): That fix only applies to kernels 6.7.5 or newer. I don't imagine a Synology server would have such a new kernel. It could be that the kernel is too old instead and/or that you're missing a driver.
Author
Owner

@vuongtt92 commented on GitHub (May 22, 2024):

so there's nothing I can do about it? I see that hardware accelerator works well with Plex while transcoding but I've tried many fixes but can't get it work with immich ML

@vuongtt92 commented on GitHub (May 22, 2024): so there's nothing I can do about it? I see that hardware accelerator works well with Plex while transcoding but I've tried many fixes but can't get it work with immich ML
Author
Owner

@mertalev commented on GitHub (May 22, 2024):

I can't say for certain, but I wouldn't be surprised if it's impossible without a newer host environment.

But on the other hand, your processor would likely run into other issues with OpenVINO, so you may have had to use CPU instead anyway. I can only recommend OpenVINO for Iris Xe and Arc graphics - anything else is too unreliable from what I've seen.

@mertalev commented on GitHub (May 22, 2024): I can't say for certain, but I wouldn't be surprised if it's impossible without a newer host environment. But on the other hand, your processor would likely run into other issues with OpenVINO, so you may have had to use CPU instead anyway. I can only recommend OpenVINO for Iris Xe and Arc graphics - anything else is too unreliable from what I've seen.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#3145