Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The build process is being killed on M2 processor #30

Open
bvdmitri opened this issue Mar 2, 2023 · 4 comments
Open

The build process is being killed on M2 processor #30

bvdmitri opened this issue Mar 2, 2023 · 4 comments

Comments

@bvdmitri
Copy link

bvdmitri commented Mar 2, 2023

I have the following script to compile my paper:

→ cat compile.sh
docker run --rm \
    --volume $PWD:/data \
    --user $(id -u):$(id -g) \
    --env JOURNAL=joss \
    openjournals/inara

Somewhere in the middle of the process I get "Killed" message.
In the beginning docker complains with the following warning:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

I tried to set --platform linux/arm64/v8, but it seems that there is no such image available.

@tarleb
Copy link
Collaborator

tarleb commented Mar 2, 2023

This is an unfortunate consequence of pandoc/dockerfiles#134. We built on those images, so there is nothing we can do until that issue is done.

@rikhuijzer
Copy link

rikhuijzer commented Aug 24, 2023

I'm on a M1 and also got the "Killed" response. After following the process with

$ docker stats

it appears that the process runs out of memory during document building when using the default Docker settings. On my Mac, the default Docker memory limit was 7.9 GB and the process requires 12.94 GB of RAM during the execution of the self-citation.lua filter.

After bumping the default limit from 8 GB to 14 GB, the process does finish and takes about 3 minutes. On my x86 Linux it took only about 30 seconds. So it's about 5 times is slow while this processor is in general much quicker than my x86 was.

In summary, it does work when setting the memory limits to at least 13 GB, but it does run very inefficient.

EDIT: rust-lang/cargo#10583 appears related as does docker/for-mac#5179 (comment). Root cause appears to be static memory (bytecodealliance/wasmtime#1895).

@cthoyt
Copy link
Contributor

cthoyt commented Oct 22, 2024

FYI, pandoc 3.5 now claims to support multi-architecture builds for the pandoc/core image, but not yet for pandoc/latex image

@tarleb
Copy link
Collaborator

tarleb commented Oct 22, 2024

I'm considering a switch to pandoc/latex:3.5-ubuntu as the base image. That would add a few megabytes (~30MB), but would allow to build multi-platform images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants