Fix/allowlist validation docker image#3029
Merged
edsavage merged 6 commits intoelastic:mainfrom Apr 29, 2026
Merged
Conversation
PyTorch Docker nightly triggers ml-cpp-pr-builds with DOCKER_IMAGE set to ml-linux-dependency-build:pytorch_latest for compile steps. validate_pytorch_allowlist incorrectly reused that image; torch there cannot load MKL (libmkl_intel_lp64.so.2). Only use DOCKER_IMAGE for allowlist validation when it is an ml-linux-build image; otherwise keep the default ml-linux-build:34. Made-with: Cursor
Install intel-oneapi-mkl-devel-2024.0 in the builder and copy MKL lib/ into /usr/local/gcc133 before building PyTorch, mirroring dev-tools/docker/linux_image. Set LD_LIBRARY_PATH (and PATH) in the final rockylinux stage so import torch resolves MKL alongside libtorch_cpu.so in ml-linux-dependency-build:pytorch_latest. Made-with: Cursor
Stop switching to ml-linux-build when DOCKER_IMAGE differs; always use ml-linux-dependency-build:pytorch_latest (optional PYTORCH_ALLOWLIST_VALIDATION_IMAGE override). Requires published pytorch_latest with MKL staged (pytorch_linux_image). Keep LD_LIBRARY_PATH on the step for older tags until the image rolls out. Made-with: Cursor
pytorch_linux_image sets LD_LIBRARY_PATH in pytorch_latest; nightly republish picks it up. Made-with: Cursor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
MKL install block was added without keeping /usr/local/bin in PATH; sccache lives there so BuildKit RUN hit 'sccache: command not found' (exit 127) when GCS credentials were mounted. Made-with: Cursor
Resolve Dockerfile comment conflict with main (sccache PATH + gcc133 copy). Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
Updates the PyTorch Linux dependency image and Buildkite allowlist validation pipeline so import torch works reliably (notably by ensuring MKL runtime libraries are present/resolvable in the final runtime image).
Changes:
- Install Intel oneAPI MKL into
/usr/local/gcc133during the PyTorch dependency image build so MKL is carried into the final stage. - Set
LD_LIBRARY_PATH(andPATH) in the final stage of the PyTorch dependency image to ensure runtime dependency resolution without a “build shell” environment. - Switch allowlist validation to run against the published PyTorch dependency image by default, with an explicit override variable.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
dev-tools/docker/pytorch_linux_image/Dockerfile |
Vendors MKL into the copied toolchain tree and ensures runtime env vars are set in the final image. |
.buildkite/pipelines/validate_pytorch_allowlist.yml.sh |
Uses the published PyTorch dependency image for validation by default and introduces an explicit override var. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Pinging @elastic/ml-core (Team:ML) |
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.
No description provided.