{"id":6774,"date":"2026-06-21T00:21:45","date_gmt":"2026-06-20T16:21:45","guid":{"rendered":"https:\/\/www.alfredivy.sg\/blogger\/?p=6774"},"modified":"2026-07-02T17:07:13","modified_gmt":"2026-07-02T09:07:13","slug":"lets-give-immich-some-gpu","status":"publish","type":"post","link":"https:\/\/www.alfredivy.sg\/blogger\/2026\/06\/lets-give-immich-some-gpu\/","title":{"rendered":"Let&#8217;s give Immich some GPU"},"content":{"rendered":"\n<p class=\"has-drop-cap wp-block-paragraph\">Immich uses machine learning to extract info like text and faces from the photos.  To aid this, it can use the GPU like any AI.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">In the docker compose file, add the following in bold.  Note the indentations are sensitive.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>immich-machine-learning:\n  image: ghcr.io\/immich-app\/immich-machine-learning:release<strong>-openvino<\/strong>\n<strong>  devices:\n    - \/dev\/dri:\/dev\/dri<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Start the container by<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check if <code>\/dev\/dri<\/code> is available inside the container<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it immich_machine_learning ls \/dev\/dri<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There should be <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>card0<br>renderD128<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I got <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>by-path\ncard0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install the GPU drivers<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install mesa-utils -y\nsudo apt install intel-gpu-tools -y\nlspci | grep -i vga<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It should return<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the Docker OpenVINO status<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it immich_machine_learning python3 -c \"import onnxruntime as ort; print(ort.get_available_providers())\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Both of the following should be shown.  If it shows CPUExecution Provider only it means GPU support is not available.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;'OpenVINOExecutionProvider', 'CPUExecutionProvider']<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><s>Immich machine learning is now running on the GPU.<\/s><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The ls dev\/dri command should show the following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>card0\nrenderD128<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">My setup shows only card0, which is a virtual GPU. I need to passthrough the GPU functions from Proxmox into Debian. In the Proxmox, find the GPU hardware.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lspci | grep -i vga<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output should be something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>00:02.0 VGA compatible controller &#91;0300]: Intel Corporation UHD Graphics 630 &#91;8086:3e92]<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>qm list\nqm stop &lt;VMID&gt;\nqm set &lt;VMID&gt; -hostpci0 00:02.0 \nqm start &lt;VMID&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Inside Debian, list again.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ll \/dev\/dri \n \ndrwxr-xr-x 2 root root 100 Jul 2 10:44 by-path \ncrw-rw----+ 1 root video 226, 0 Jul 2 10:44 card0 \ncrw-rw----+ 1 root video 226, 1 Jul 2 10:44 card1 \ncrw-rw----+ 1 root render 226, 128 Jul 2 10:44 renderD128 <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In Jellyfin&#8217;s Dashboard, Playback, Encoding, set the following to use the GPU <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hardware acceleration<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VA API<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">VA API Device<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/dri\/renderD128<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To check verify use<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<br>sudo apt install intel-gpu-tools<br>sudo intel_gpu_top<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Play a video at a very high or low bitrate. The video bar should be high. Click on thumbnail below for a bigger picture<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a758796ebdc7&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a758796ebdc7\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"494\" height=\"53\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"http:\/\/www.alfredivy.sg\/blogger\/wp\/wp-content\/uploads\/2026\/06\/image-1-494x53.png\" alt=\"\" class=\"wp-image-6811\" srcset=\"https:\/\/www.alfredivy.sg\/blogger\/wp\/wp-content\/uploads\/2026\/06\/image-1-494x53.png 494w, https:\/\/www.alfredivy.sg\/blogger\/wp\/wp-content\/uploads\/2026\/06\/image-1-188x20.png 188w, https:\/\/www.alfredivy.sg\/blogger\/wp\/wp-content\/uploads\/2026\/06\/image-1-768x82.png 768w, https:\/\/www.alfredivy.sg\/blogger\/wp\/wp-content\/uploads\/2026\/06\/image-1-1536x164.png 1536w, https:\/\/www.alfredivy.sg\/blogger\/wp\/wp-content\/uploads\/2026\/06\/image-1.png 1659w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Immich uses machine learning to extract info like text and faces from the photos. To aid this, it can use the GPU like any AI.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[611,634,624,635],"class_list":["post-6774","post","type-post","status-publish","format-standard","hentry","category-servers","tag-docker","tag-gpu","tag-immich","tag-machine-learning"],"_links":{"self":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/6774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/comments?post=6774"}],"version-history":[{"count":11,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/6774\/revisions"}],"predecessor-version":[{"id":6822,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/6774\/revisions\/6822"}],"wp:attachment":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/media?parent=6774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/categories?post=6774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/tags?post=6774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}