fix(ci): cap Syft heap inside DinD
Managed validation / Managed repository validation (pull_request) Successful in 2m39s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Successful in 2m49s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Successful in 31s
GeoIntel release gates / Production AI image, SBOM and container scan (pull_request) Successful in 7m31s
GeoIntel release gates / Deploy exact gated revision to Unraid (pull_request) Skipped

This commit is contained in:
Jens
2026-08-30 13:25:37 +02:00
parent aec584d433
commit 9f771a61cf
2 changed files with 9 additions and 4 deletions
+7 -4
View File
@@ -57,13 +57,16 @@ if [[ -n "${HOSTNAME:-}" ]] && docker inspect --type container "$HOSTNAME" >/dev
WORKSPACE_ARGS=(--volumes-from "$HOSTNAME")
fi
# CUDA and PyTorch ship several gigabytes of native binaries. Syft's heuristic
# binary catalogers exceed the isolated runner's 8 GiB limit on that content.
# Authoritative dpkg, Python, npm and other installed-package catalogers remain
# enabled; Trivy still scans the complete immutable archive independently.
# CUDA and PyTorch ship several gigabytes of native binaries. Keep Syft's Go
# heap below the isolated runner's 8 GiB limit and collect garbage proactively;
# otherwise the Docker-in-Docker job can be OOM-killed even with one cataloger
# worker. Authoritative dpkg, Python, npm and other installed-package catalogers
# remain enabled; Trivy still scans the complete immutable archive independently.
docker run --rm \
--user 0:0 \
-e "SYFT_PARALLELISM=${SYFT_PARALLELISM:-1}" \
-e "GOMEMLIMIT=${SYFT_GOMEMLIMIT:-4GiB}" \
-e "GOGC=${SYFT_GOGC:-25}" \
"${WORKSPACE_ARGS[@]}" \
-w "$WORKDIR" \
"$SYFT_IMAGE" \