#Problem enabling hw accelleration.

1 messages · Page 1 of 1 (latest)

flat saddle
#

I've just set up Immich and it seems really good, I'm running it on an old PC and I have imported a portion of my photo archive. It's syncing from my phone and is doing pretty much what I want.

When importing more of my photo archive I would like to run the remote machine learning on other PC's with dedicated nvidia GPUs to help with the face detection as this is pretty slow on my current server. I have tried following the instructions in the documentation for setting up hardware accellerated ml and I think I've almost got it but I'm getting an error.

I set this up on two separate PCs running windows 11 under WSL and I hit the same issue on both.

Under WSL I installed docker, downloaded the hwaccel.ml.yml and docker-compose.yml files specified here https://immich.app/docs/features/ml-hardware-acceleration and here https://immich.app/docs/guides/remote-machine-learning/ .

I editied the docker-compose.yml file to use cuda (as attached) and ran "docker compose up -d".

The output on both is as follows:

$ docker compose up -d
[+] Running 1/2
✔ Network immich_remote_ml_default Created 0.1s
⠙ Container immich_machine_learning Starting 0.1s
Error response from daemon: could not select device driver "nvidia" with capabilities: [[gpu]]

running nvidia-smi in WSL shows the graphics card as being detected, but I think I've missed something that isn't letting immich find it.

Any ideas on what I've missed or the next steps in diagnosing this ?

pallid chasmBOT
#

:wave: Hey @flat saddle,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

pallid chasmBOT
flat saddle
#

If I comment out the 'extends' section in docker-compose.yml (the extends, file and service lines) then the container starts up. Presumably this is ready to do remote ml but without hardware accelleration. This confirms the issue is with the immich code accessing the GPU.

iron pike
#

It’s impossible for this to be an immich code issue because the error is coming from Docker before the container has started. It’s saying that it can’t find an nvidia gpu to provide to the container

flat saddle
#

Yep, I didn't think it was immich directly but was hoping I could get some guidance on how to set up docker to allow the nvidia gpu to be used.

iron pike
#

It should normally “just work” without any explicit setup. You have the latest nvidia driver installed right?

#

And the latest Docker Desktop version

flat saddle
#

I'm running the latest graphics driver, but I'm not running Docker Desktop. I installed Docker in WSL via curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
Is Docker Desktop required ?

iron pike
#

Oh, if you installed it that way then you probably do need to install nvidia container toolkit

#

Docker desktop is not required (and is actually less stable and efficient compared to what you did), but the instructions kind of assume you’re using it

flat saddle
iron pike
#

You’d probably want to look at the instructions for ubuntu. Just don’t install any nvidia drivers inside wsl2

#

(also you don’t need to install cuda, that’s inside the container)

flat saddle
#

Ah, I wonder if I've install the Nvidia Cuda toolkit, which may not be the same as the Nvidia container toolkit ? I will check and report back. Thanks for this support, it's helping me figure this out 😄

flat saddle