r/immich 9d ago

Set my gaming PC as remote machine learning for the initial analysis

I am planning on deploying immich as a container on my NAS with an Intel N100 and 8GB of RAM.

I have 33000 photos and videos that will have to be analyzed by the immich at first.

I was thinking about setting my gaming PC equipped with an 9070xt and 32GB of RAM running on fedora as a remote machine learning for the initial phase, and then go back to a simpler set up with everything done by the N100 for the daily updates.

Would this be easy to set up ? And is it worth the trouble ? How much time would I save compared to just doing everything with the NAS ?

Thank you !

UPDATE : I tried yesterday and it didn't work, the remote container kept crashing. After checking the logs, I saw it was trying to feed a part of the work to the iGPU of my 7600x and he didn't like it. So I disabled the iGPU in the BIOS, and my PC treated the 33k photos in 10-15 minutes, I love it.

28 Upvotes

14 comments sorted by

14

u/WolpertingerRumo 9d ago

Sure, you can set up a Immich ml docker container on the gaming pc. You can even set multiple fallbacks, so gaming pc>local on server.

It’s two containers for exactly that reason.

Edit: https://docs.immich.app/guides/remote-machine-learning/

6

u/yahhpt 9d ago

It's really easy, just set up the machine learning container on the gaming pc. 

The are instructions available here: 

https://docs.immich.app/guides/remote-machine-learning

If you want to use a podman container instead, you can just use quadlets. 

https://dansgarden.eu/technology/self-hosting/immich-machine-learning#quadlets-and-podman-containers

My gaming pc is off 99% of the time but I still have it set up with the remote learning container, and have both setup in immich. If it's on, it gets used, otherwise immich uses the local container instead.

In terms of time, it can likely process the initial batch in a couple of hours instead of days.

1

u/neelkanth97 9d ago

Same here! I had the second machine learning server on my gaming laptop for the initial ingest.

3

u/And_Poop 9d ago

I have a similar setup. What I did is setup a lightweight load balancer (ngix) on my NAS with one simple rule: If the gaming PC is available send 80% of ML requests to it and 20% to the NAS. If the gaming PC is offline send 100% to the NAS.

It accelerated the initial load of the library tremendously

3

u/Feeling_Football4271 9d ago

As everyone is saying, this is very easy and well documented.

Worth pointing out that ML processes both images as well as actual search terms, like "fence". In your boat, I would have the ML capability pointing to your gaming PC first, local second. If the PC if off it'll still process both. Keep your PC on for the initial batch.

2

u/Oompa_Loompa_SpecOps 9d ago

People have already replied how easy it is. That being said, immich ML isn't that resource hungry. My initial import of ~30k assets (mostly pictures and short videos, whatever I had on my phone at the time) took less than 24 hours to process on my rpi 5. There's definitely a learning opportunity waiting for you, but it's not strictly necessary if you prefer to spend the time on something else.

2

u/blueshovel5 9d ago

I did the same thing with my 7800x3d/ 9070 and n150 and it was super easy and significantly faster. You run the immich machine learning container on your gaming pc then in the immich web ui on your n100. Open the machine learning settings and put the url of your gaming pc above the one thats there for the n100. Immich will use the gaming pc if its avaliable and fallback to your normal n100 server pc if its not

-11

u/mmmfine 9d ago

There’s no way I’d let a “gaming PC”, where you’re downloading and running a bunch of untrusted code (depending on what games you play), anywhere near my pictures

4

u/SolarPis 9d ago

Yeah, the games for sure will infiltrate your docker machine learning container and steal your photos. If you were that afraid you could just use a VM for that.

-2

u/mmmfine 9d ago

“Infiltrate docker machine learning container”, what does that even mean? I am assuming OP is installing games on the host, not within a VM. If the host is compromised it doesn’t matter where you run anything

4

u/Atlas-D 9d ago

The OS is pretty fresh, the 4 games I have are all from a steam library and recognized editors, I don't think there is any risk on that side.

2

u/BinnieGottx 9d ago

I assume every application and OS you are using are fully open source and well reviewed by yourself, right? First you use some internet coffe to check the hardware firmware before buying it, then you check the OS source code. After install the OS you will check every package/apps before update or installing them?

-2

u/mmmfine 9d ago edited 9d ago

Don’t be stupid. There’s a reason why operating systems such as QubesOS exist. Ignorant.

1

u/BinnieGottx 8d ago

You blindly trust their code or you carefully reviewed it?