From a13a9f6806520bdc458a6ac19b39deae860bf5f4 Mon Sep 17 00:00:00 2001 From: Christopher Owen Date: Thu, 18 Dec 2025 13:31:54 +0100 Subject: [PATCH] Limit build parallelism to reduce OOM situations --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 78bdd9d..2285d93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,20 @@ # syntax=docker/dockerfile:1.6 +# Limit build parallelism to reduce OOM situations +ARG BUILD_JOBS=16 + # ========================================================= # STAGE 1: Base Image (Installs Dependencies) # ========================================================= FROM nvidia/cuda:13.1.0-devel-ubuntu24.04 AS base +# Build parallemism +ARG BUILD_JOBS +ENV MAX_JOBS=${BUILD_JOBS} +ENV CMAKE_BUILD_PARALLEL_LEVEL=${BUILD_JOBS} +ENV NINJAFLAGS="-j${BUILD_JOBS}" +ENV MAKEFLAGS="-j${BUILD_JOBS}" + # Set non-interactive frontend to prevent apt prompts ENV DEBIAN_FRONTEND=noninteractive