From 1eeee46a3401e04ba6b081301724f0473a569c84 Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Fri, 6 Mar 2026 20:17:30 +0300 Subject: [PATCH] =?UTF-8?q?Remove=20gpu=5Fburn=20from=20ISO=20build=20?= =?UTF-8?q?=E2=80=94=20binary=20too=20large?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gpu_burn requires CUDA toolkit (~4GB) to build and the resulting binary would significantly inflate the ISO. Removed from vendor tool list and smoketest. build-gpu-burn.sh dropped as well. Co-Authored-By: Claude Sonnet 4.6 --- iso/builder/build-gpu-burn.sh | 82 ----------------------------------- iso/builder/build.sh | 2 +- iso/builder/smoketest.sh | 12 +++-- 3 files changed, 6 insertions(+), 90 deletions(-) delete mode 100644 iso/builder/build-gpu-burn.sh diff --git a/iso/builder/build-gpu-burn.sh b/iso/builder/build-gpu-burn.sh deleted file mode 100644 index 5602781..0000000 --- a/iso/builder/build-gpu-burn.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -# build-gpu-burn.sh — build gpu_burn stress tool and output static-ish binary to DIST_DIR -# -# gpu_burn requires nvcc (CUDA toolkit). This script downloads a minimal CUDA toolkit -# runfile, extracts only nvcc + headers, builds gpu_burn, then cleans up the toolkit. -# -# Output: $DIST_DIR/gpu_burn (ready to copy into ISO vendor/) -# -# Usage: sh build-gpu-burn.sh - -set -e - -DIST_DIR="$1" -[ -n "$DIST_DIR" ] || { echo "usage: $0 "; exit 1; } -mkdir -p "$DIST_DIR" - -OUTPUT="$DIST_DIR/gpu_burn" -if [ -f "$OUTPUT" ] && [ -s "$OUTPUT" ]; then - echo "=== gpu_burn cached: $OUTPUT ===" - exit 0 -fi - -# CUDA toolkit version for building — only nvcc + headers needed, not the full runtime. -# Must be <= max CUDA version supported by the NVIDIA driver in VERSIONS. -# Driver 590.48.01 supports up to CUDA 13.1; use 12.6 (stable, widely tested). -CUDA_VERSION="12.8.1" -CUDA_BUILD="570.124.06" -CUDA_RUN="/var/tmp/cuda-${CUDA_VERSION}.run" -CUDA_DIR="/var/tmp/cuda-toolkit-${CUDA_VERSION}" - -echo "=== building gpu_burn (CUDA ${CUDA_VERSION}) ===" - -# Install build dependencies -apk add --quiet gcc g++ make git wget libxml2 - -# Download CUDA toolkit runfile if not cached -if [ ! -s "$CUDA_RUN" ]; then - echo "=== downloading CUDA ${CUDA_VERSION} toolkit ===" - wget -q --show-progress -O "$CUDA_RUN" \ - "https://developer.download.nvidia.com/compute/cuda/${CUDA_VERSION}/local_installers/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux.run" -fi - -# Extract toolkit (nvcc + headers only — skip driver, samples, docs to save time/space) -if [ ! -d "$CUDA_DIR/bin/nvcc" ] && [ ! -f "$CUDA_DIR/bin/nvcc" ]; then - echo "=== extracting CUDA toolkit ===" - rm -rf "$CUDA_DIR" - sh "$CUDA_RUN" \ - --silent \ - --toolkit \ - --toolkitpath="$CUDA_DIR" \ - --no-opengl-libs \ - --no-drm \ - --override 2>&1 | tail -5 -fi - -NVCC="$CUDA_DIR/bin/nvcc" -[ -f "$NVCC" ] || { echo "ERROR: nvcc not found after extraction: $NVCC"; exit 1; } -echo "nvcc: $("$NVCC" --version | head -1)" - -# Clone gpu_burn source -GPU_BURN_DIR="/var/tmp/gpu-burn-src" -if [ ! -d "$GPU_BURN_DIR/.git" ]; then - echo "=== cloning gpu-burn ===" - git clone --depth=1 https://github.com/wilicc/gpu-burn.git "$GPU_BURN_DIR" -else - echo "=== gpu-burn source already cloned ===" -fi - -# Build -echo "=== building gpu_burn ===" -cd "$GPU_BURN_DIR" -make clean 2>/dev/null || true -CUDA_PATH="$CUDA_DIR" make 2>&1 - -[ -f "$GPU_BURN_DIR/gpu_burn" ] || { echo "ERROR: gpu_burn binary not produced"; exit 1; } - -cp "$GPU_BURN_DIR/gpu_burn" "$OUTPUT" -cp "$GPU_BURN_DIR/compare.ptx" "$(dirname "$OUTPUT")/compare.ptx" 2>/dev/null || true - -echo "=== gpu_burn build complete ===" -ls -lh "$OUTPUT" -echo "NOTE: compare.ptx must be present in same dir as gpu_burn at runtime" diff --git a/iso/builder/build.sh b/iso/builder/build.sh index 55f43ce..63a66eb 100755 --- a/iso/builder/build.sh +++ b/iso/builder/build.sh @@ -99,7 +99,7 @@ cp "${DIST_DIR}/bee-audit-linux-amd64" "${OVERLAY_DIR}/usr/local/bin/audit" chmod +x "${OVERLAY_DIR}/usr/local/bin/audit" # --- vendor utilities (optional pre-fetched binaries) --- -for tool in storcli64 sas2ircu sas3ircu mstflint gpu_burn; do +for tool in storcli64 sas2ircu sas3ircu mstflint; do if [ -f "${VENDOR_DIR}/${tool}" ]; then cp "${VENDOR_DIR}/${tool}" "${OVERLAY_DIR}/usr/local/bin/${tool}" chmod +x "${OVERLAY_DIR}/usr/local/bin/${tool}" || true diff --git a/iso/builder/smoketest.sh b/iso/builder/smoketest.sh index 2612159..5705619 100644 --- a/iso/builder/smoketest.sh +++ b/iso/builder/smoketest.sh @@ -38,13 +38,11 @@ for tool in dmidecode smartctl nvme ipmitool lspci audit; do fi done -for tool in nvidia-smi gpu_burn; do - if p=$(PATH="/usr/local/bin:$PATH" command -v "$tool" 2>/dev/null); then - ok "$tool found: $p" - else - warn "$tool: NOT FOUND (optional but expected)" - fi -done +if p=$(PATH="/usr/local/bin:$PATH" command -v nvidia-smi 2>/dev/null); then + ok "nvidia-smi found: $p" +else + fail "nvidia-smi: NOT FOUND" +fi echo "" echo "-- NVIDIA modules --"