OCR-D / ocrd_all

Master repository which includes most other OCR-D repositories as submodules
MIT License
71 stars 18 forks source link

Docker: build multi-architecture images #432

Open bertsky opened 3 months ago

bertsky commented 3 months ago

ATM we only target linux/amd64 as platform. This unnecessarily reduces the utility of OCR-D. For example, Apple hardware will almost always be some ARM CPU (becoming slow under QEMU or not even supported because of missing AVX). Also, in HPC systems the architecture can be PowerPC or other non-x86 – converting Docker images to Singularity is not possible if the CPU architecture does not match.

I suggest following the second recipe (parallel+merge) from this guide to address this.

stweil commented 3 months ago

I run OCR-D natively on macOS with ARM64 and would support multi-architecture Docker images only if there is a certain demand for such images. Otherwise I am afraid that this simply wastes resources (developer time, environmental resources needed for increased build time, image sizes, ...).

bertsky commented 3 months ago

Native installation is more demanding for users. The whole point of having Dockerization is reducing the threshold for the user. We already decided to go for that when we set up the Docker route. It's just a matter of following through on the CPU architecture.

And on resources: Build time – certainly, but it's worth it (see above). Developer time – sure, but not so much (it's only a minor change), and supporting users with their native installation struggle also binds time. We still have lots of issues with the Docker builds ATM, so IMO this can all happen in one move.

bertsky commented 1 month ago

So now that https://github.com/OCR-D/core/pull/1239 is merged, we can proceed doing the same here.