Limit build parallelism to reduce OOM situations

This commit is contained in:
Christopher Owen
2025-12-18 13:31:54 +01:00
parent e0f6cff132
commit a13a9f6806

View File

@@ -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