Skip to content

Fix/allowlist validation docker image#3029

Merged
edsavage merged 6 commits intoelastic:mainfrom
edsavage:fix/allowlist-validation-docker-image
Apr 29, 2026
Merged

Fix/allowlist validation docker image#3029
edsavage merged 6 commits intoelastic:mainfrom
edsavage:fix/allowlist-validation-docker-image

Conversation

@edsavage
Copy link
Copy Markdown
Contributor

No description provided.

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
@prodsecmachine
Copy link
Copy Markdown

prodsecmachine commented Apr 28, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/gcc133 during the PyTorch dependency image build so MKL is carried into the final stage.
  • Set LD_LIBRARY_PATH (and PATH) 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.

@edsavage edsavage marked this pull request as ready for review April 29, 2026 02:36
@elasticsearchmachine
Copy link
Copy Markdown

Pinging @elastic/ml-core (Team:ML)

@edsavage edsavage merged commit 0d0ccc9 into elastic:main Apr 29, 2026
8 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants