fix(install_deps): resolve SCRIPT_DIR before dependency builds cd away - #298
Merged
Conversation
install_batchgen_kernels() and install_batchgen() resolved SCRIPT_DIR from BASH_SOURCE[0] at call time. Invoked as ./scripts/install_deps.sh, that path is relative, and the earlier installers cd into $INSTALL_DIR (/tmp/batchgen_deps/...), so on every fresh machine the run died at the kernels step: ./scripts/install_deps.sh: line 257: cd: ./scripts: No such file or directory leaving batchgen_kernels and batchgen uninstalled. Resolve SCRIPT_DIR/BATCHGEN_DIR once at script start and reuse them. close #285
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolve
SCRIPT_DIR/BATCHGEN_DIRonce at the top ofscripts/install_deps.sh(before anything cancd) and reuse them ininstall_batchgen_kernels()/install_batchgen().Motivation
Invoked as
./scripts/install_deps.sh,BASH_SOURCE[0]is relative; the dependency installerscdinto$INSTALL_DIR(/tmp/batchgen_deps/...), so every fresh run died right after building the deps:leaving
batchgen_kernelsandbatchgenuninstalled — i.e. INSTALL.md Option B shipped a broken install on every fresh machine (reproduced in a fresh Ubuntu 22.04 + CUDA 12.8 container: torch/FA3/FlashMLA/DeepGEMM all built, then the crash).close #285
Verification
Fresh Ubuntu 22.04 + CUDA 12.8.1 container (no GPU, no conda cache):
./scripts/install_deps.sh --allwith this PR (+ #284 for the kernels arch fix) runs end-to-end —[OK] Installation complete!, 23batchgen_kernelsextensions installed,import batchgenOK from/root.Type of Change
infra— build / CI / packaging / scripts / DockerFile changes
scripts/install_deps.shChecklist
PR Merge Policy Contract — pre-merge checklist
git diff --stat origin/mainreviewed; every file traces to the task — no unrelated files (§3.1).test_*.pyinside the runtime package (§1.2).BATCHGEN_*env-var debug guard (§1.3).