Skip to content

Commit a6ea8de

Browse files
committed
Force amd64 platform and limit final ffmpeg build to prevent crashes
Attempting to build on mac m4 w/ 24gb of ram fails due to wrong arch (arm vs amd64) and out of control memory consumption that crashes docker on the last ffmpeg build process unless we limit cpu's to 2 which seems to keep docker around 8GB. This fixes both things.
1 parent efac247 commit a6ea8de

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile-upstream:master-labs
22

33
# Base emsdk image with environment variables.
4-
FROM emscripten/emsdk:3.1.40 AS emsdk-base
4+
FROM --platform=linux/amd64 emscripten/emsdk:3.1.40 AS emsdk-base
55
ARG EXTRA_CFLAGS
66
ARG EXTRA_LDFLAGS
77
ARG FFMPEG_ST

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ build:
2020
FFMPEG_ST="$(FFMPEG_ST)" \
2121
FFMPEG_MT="$(FFMPEG_MT)" \
2222
docker buildx build \
23+
--platform linux/amd64 \
2324
--build-arg EXTRA_CFLAGS \
2425
--build-arg EXTRA_LDFLAGS \
2526
--build-arg FFMPEG_MT \

build/ffmpeg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ CONF_FLAGS=(
3030
)
3131

3232
emconfigure ./configure "${CONF_FLAGS[@]}" $@
33-
emmake make -j
33+
emmake make -j2

0 commit comments

Comments
 (0)