Skip to content

[BUILD,FIX] Dockerfile: verified fallback for the ONNX Runtime release download - #10951

Merged
poshul merged 1 commit into
developfrom
claude/laughing-wozniak-dcylp9
Nov 20, 2026
Merged

poshul merged 1 commit into
developfrom
claude/laughing-wozniak-dcylp9

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

The nightly Deploy container images workflow has failed three nights in a row (2026-11-18, -19, -20; runs 44214412845, 44435430923, 44652120614). It fails in the base stage of dockerfiles/Dockerfile:

+ wget https://github.com/microsoft/onnxruntime/releases/download/v1.30.0/onnxruntime-linux-aarch64-1.30.0.tgz -O ort.tgz
HTTP request sent, awaiting response... 404 Not Found

Root cause: github.com/microsoft/onnxruntime has returned 404 since 2026-11-18 (#10946). #10947 added a hash-verified mirror fallback for the vcpkg overlay port's source archive, which fixed Build and Test and Release. The Dockerfile downloads Microsoft's prebuilt release tarball separately, and #10947 did not cover that download. So the container build still fails on develop at 6be4c55, after #10946 was closed.

Change: the Dockerfile tries Microsoft's release URL first. If that fails, it downloads from PhotoPrism's mirror of the same release archives (https://dl.photoprism.app/onnx/runtime/v<ver>/<name>.tgz), the same mirror #10947 uses. Each download must match the SHA256 already pinned in the Dockerfile. The version, the hashes and the rest of the step are unchanged. The loop is plain POSIX sh, because the RUN heredoc runs under /bin/sh.

Why this is not just a way to make CI pass: the image still gets exactly the pinned ONNX Runtime 1.30.0 binaries:

  • onnxruntime-linux-x64-1.30.0.tgz from the mirror has sha256 a5ed5a3c…b3fd, equal to ONNXRUNTIME_SHA256_AMD64.
  • onnxruntime-linux-aarch64-1.30.0.tgz from the mirror has sha256 e16a27a8…e3da, equal to ONNXRUNTIME_SHA256_ARM64.
  • A file whose hash does not match still fails the build.

Once Microsoft's repository is back, the first URL succeeds and the mirror is never contacted.

How it was tested: I ran the RUN step's script under dash locally, without Docker:

  • arm64: the upstream URL returns 404, the mirror is used, the hash check passes (ort.tgz: OK), and the archive is extracted. The include/onnxruntime_cxx_api.h and lib/libonnxruntime.so checks pass.
  • amd64: same result.
  • arm64 with a wrong pinned hash: the hash check fails, the step exits 1, and the build stops as intended.

I did not run a full docker buildx build. The container workflow on this branch, or the next nightly, is the end-to-end check.

For maintainers to decide: #10946 says the choice of an alternative download source is a maintainer decision. This PR reuses the mirror that was already accepted for #10947. If you would rather host the tarballs on OpenMS infrastructure, the fallback URL is the only line to change.

Checklist

  • New and existing unit tests pass locally with my changes (no C++ changes; I tested the changed RUN step as described above)

AI use (see the OpenMS AI Policy)

  • I have read the OpenMS AI Policy, and I understand, have reviewed and tested every change in this PR and can explain it in my own words (left for the human reviewer)
  • Substantial AI use in PR (e.g. agentic tools wrote significant parts); commits carry a Co-authored-by: trailer, and the description above explains the design intent and rationale

An AI agent opened this PR from a scheduled nightly-CI check. A maintainer needs to review it before merging.


Generated by Claude Code

Summary by CodeRabbit

  • Build Reliability
    • ONNX Runtime downloads now use a fallback source and require a verified checksum before the build proceeds.

…e download

github.com/microsoft/onnxruntime answers 404 since 2026-11-18 (#10946), so the
"Deploy container images" nightly fails in the base stage when it downloads
onnxruntime-linux-<arch>-1.30.0.tgz (runs 44214412845, 44435430923,
44652120614). #10947 added a fallback for the vcpkg overlay port's source
archive; the Dockerfile's prebuilt download was not covered.

Try Microsoft's release first and then PhotoPrism's mirror of the same
release archives (the mirror #10947 uses). Each download must match the
pinned SHA256; version and hashes are unchanged. The mirror's x64 and aarch64
tarballs match the pinned sums byte for byte.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Atu9S5a3hWzrBBhKLsQFFX
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Dockerfile now tries Microsoft’s ONNX Runtime release URL first and PhotoPrism’s mirror second. It verifies each archive against the architecture-specific pinned SHA-256 value and fails the build if neither download passes.

Changes: Docker ONNX Runtime download

Layer / File(s) Summary
Add verified fallback download
dockerfiles/Dockerfile
The download step tries Microsoft’s URL, then PhotoPrism’s mirror. Each archive must pass the pinned checksum. The build fails if both attempts fail.

Possibly related PRs

  • OpenMS/OpenMS#10947: Adds the same PhotoPrism mirror fallback for ONNX Runtime in a vcpkg overlay port.

Suggested reviewers: jpfeuffer

Change: Bug fix

Merge Risk: Minimal · up to dcafc

The Dockerfile now falls back to PhotoPrism's mirror if Microsoft's ONNX Runtime download fails. Both sources are checked against the same pinned hashes, so a bad archive still fails the build. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the Dockerfile and the ONNX Runtime release download, which matches the only changed file and the main change. It adds a verified fallback to the PhotoPrism mirror when the Microsoft U…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the Dockerfile and the ONNX Runtime release download, which matches the only changed file and the main change. It adds a verified fallback to the PhotoPrism mirror when the Microsoft URL fails. The [BUILD,FIX] prefix is a tag, not noise, and the title is specific enough for a teammate scanning history.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks each archive’s sum,
First Microsoft, then mirror crumb.
If both downloads fail the test,
The build stops and takes no rest.
A pinned hash guards each file,
While bunny waits beside the pile.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d039426b-508f-4e4d-9714-82bfdfa2ca5c
Commits

Reviewing files that changed from the base of the PR and between 6be4c55 and dcafc62.

Files selected for processing: 1

  • dockerfiles/Dockerfile

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@poshul
poshul merged commit 5fe9184 into develop Nov 20, 2026
33 checks passed
@poshul
poshul deleted the claude/laughing-wozniak-dcylp9 branch November 20, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants