immich icon indicating copy to clipboard operation
immich copied to clipboard

Install nightly release of pytorch to enable ML support for arm CPUs

Open ollywelch opened this issue 2 years ago • 8 comments

Hi there, thought I'd create a quick PR to enable the ML image to be built on ARM CPUs. As per pytorch's website, their nightly builds have ARM64 support. Using this would be great for us Raspberry Pi users!

On a side note, love this project, and keen to contribute back. Let me know if there's anything else I need to do for this to be considered :)

ollywelch avatar Feb 26 '23 13:02 ollywelch

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
immich ⬜️ Ignored (Inspect) Feb 26, 2023 at 2:40PM (UTC)

vercel[bot] avatar Feb 26 '23 13:02 vercel[bot]

Hello, what is the image size for this change? We use the cpu only image to keep the size small

alextran1502 avatar Feb 26 '23 14:02 alextran1502

Hello, what is the image size for this change? We use the cpu only image to keep the size small

1.6 GB when I built it on my rpi4 - quite beefy

ollywelch avatar Feb 26 '23 14:02 ollywelch

This is great, thank you! I was going to mention that the armv7 build fails, but I see you already got it :)

Alex: this is still cpu-only as far as I can tell. Olly: AFAIK future gpu support is as easy as swapping cpu for cu118, but just to be sure, do you know whether the Cuda builds also support arm64?

bo0tzz avatar Feb 26 '23 14:02 bo0tzz

Not sure about the CUDA builds, would have to check

ollywelch avatar Feb 26 '23 14:02 ollywelch

It seems like the current machine-learning image is 749MB. @ollywelch is the 1.6GB you mention for an arm-only image, or a multiplatform build?

bo0tzz avatar Feb 26 '23 14:02 bo0tzz

It seems like the current machine-learning image is 749MB. @ollywelch is the 1.6GB you mention for an arm-only image, or a multiplatform build?

@bo0tzz sorry think I quoted the wrong figure there - compressed size is 557MB (built on my rpi4), just pushed it to docker hub. Also realised I removed the --no-cache-dir from the first pip install, so I've added that back in now!

ollywelch avatar Feb 26 '23 14:02 ollywelch

Make that 483MB with the latest change :)

ollywelch avatar Feb 26 '23 14:02 ollywelch