Skip to content

ci: reuse preloaded ONNX Runtime artifact - #27325

Merged
aptend merged 1 commit into
matrixorigin:mainfrom
aptend:codex/preload-onnxruntime-base-image
Aug 19, 2026
Merged

aptend merged 1 commit into
matrixorigin:mainfrom
aptend:codex/preload-onnxruntime-base-image

Conversation

@aptend

@aptend aptend commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #26664

What this PR does / why we need it:

Use the versioned MatrixOne Go build image that preloads ONNX Runtime, and copy the artifact into the native build only after SHA-256 verification. This removes the per-PR GitHub download that can time out in image builds.

Local and non-preloaded environments retain the existing verified downloader fallback.

The base image was published after matrixorigin/ci-images#109 merged as matrixorigin/golang:1.26.4-ubuntu22.04-matrixone-native-1.

Validation:

  • Synthetic preloaded artifact: copied without invoking the downloader and installed mode is 0644.
  • Corrupt preloaded artifact: checksum verification fails and removes the destination.
  • make -C thirdparties -n onnxruntime and git diff --check.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@aptend

aptend commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Marked draft until the dependent base image from matrixorigin/ci-images#108 is published; otherwise the new immutable image tag cannot be pulled by CI.

@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Aug 19, 2026
@mergify mergify Bot added the kind/test-ci label Aug 19, 2026
@aptend
aptend force-pushed the codex/preload-onnxruntime-base-image branch from 8888ad2 to 5d37e3a Compare August 19, 2026 08:08
@aptend
aptend marked this pull request as ready for review August 19, 2026 08:08
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify mergify Bot added the kind/bug Something isn't working label Aug 19, 2026
@aptend
aptend merged commit 1d50033 into matrixorigin:main Aug 19, 2026
42 of 44 checks passed
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#26664

## What this PR does / why we need it:

Use the versioned MatrixOne Go build image that preloads ONNX Runtime,
and copy the artifact into the native build only after SHA-256
verification. This removes the per-PR GitHub download that can time out
in image builds.

Local and non-preloaded environments retain the existing verified
downloader fallback.

The base image was published after
[matrixorigin/ci-images#109](https://github.com/matrixorigin/ci-images/pull/109)
merged as `matrixorigin/golang:1.26.4-ubuntu22.04-matrixone-native-1`.

Validation:

- Synthetic preloaded artifact: copied without invoking the downloader
and installed mode is `0644`.
- Corrupt preloaded artifact: checksum verification fails and removes
the destination.
- `make -C thirdparties -n onnxruntime` and `git diff --check`.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#26664

## What this PR does / why we need it:

Use the versioned MatrixOne Go build image that preloads ONNX Runtime,
and copy the artifact into the native build only after SHA-256
verification. This removes the per-PR GitHub download that can time out
in image builds.

Local and non-preloaded environments retain the existing verified
downloader fallback.

The base image was published after
[matrixorigin/ci-images#109](https://github.com/matrixorigin/ci-images/pull/109)
merged as `matrixorigin/golang:1.26.4-ubuntu22.04-matrixone-native-1`.

Validation:

- Synthetic preloaded artifact: copied without invoking the downloader
and installed mode is `0644`.
- Corrupt preloaded artifact: checksum verification fails and removes
the destination.
- `make -C thirdparties -n onnxruntime` and `git diff --check`.
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [x] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#26664

## What this PR does / why we need it:

Use the versioned MatrixOne Go build image that preloads ONNX Runtime,
and copy the artifact into the native build only after SHA-256
verification. This removes the per-PR GitHub download that can time out
in image builds.

Local and non-preloaded environments retain the existing verified
downloader fallback.

The base image was published after
[matrixorigin/ci-images#109](https://github.com/matrixorigin/ci-images/pull/109)
merged as `matrixorigin/golang:1.26.4-ubuntu22.04-matrixone-native-1`.

Validation:

- Synthetic preloaded artifact: copied without invoking the downloader
and installed mode is `0644`.
- Corrupt preloaded artifact: checksum verification fails and removes
the destination.
- `make -C thirdparties -n onnxruntime` and `git diff --check`.
mergify Bot pushed a commit that referenced this pull request Nov 29, 2026
## What type of PR is this?

- [x] Test and CI

## Which issue(s) this PR fixes:

Related to #33416, #26664 and #33408.

## What this PR does / why we need it:

Backport the verified local ONNX Runtime path from #27325 to `4.2-dev`. Use the published Go 1.26.4 native builder image. The existing downloader owns validation and atomic installation for installed, preloaded and HTTPS sources. A warm hit restores mode `0644`. A missing cache invokes the existing HTTPS and LFS fallback. A corrupt preload is rejected without replacing the destination.

| Linux architecture | Local ONNX library | Additional compressed image layer |
| --- | ---: | ---: |
| amd64 | 23,023,576 bytes | 8,603,979 bytes |
| arm64 | 19,543,040 bytes | 7,720,445 bytes |

Compared with the current base image, only the additional layer needs to be pulled when the previous layers are cached. The warm ONNX build has zero network transfer.

The regular Docker images use the native base directly. Shared Build uses the existing image published from `main`. [#33427](#33427) exports its already-installed ONNX Runtime at the same versioned path with a symbolic link, so Shared Build can reuse the library even when its complete third-party fingerprint differs. The library is identical on both branches. Shared Build hits start with the next successful image publication containing that change.

Validated with the published Linux libraries and external networking disabled. On amd64, cache hits with only `sha256sum` and no curl succeeded and installed mode `0600` was repaired. A corrupt preload left the original destination intact. A loopback HTTPS primary 404 reached the fallback and produced a byte-identical library. On arm64 the published library and the downloader regression suite passed.

Synced to the latest `4.2-dev` and reran the Linux downloader suite. The same network-disabled amd64 image fixture verified the link exported by #33427 with the real ONNX library on both branches. Both branches passed the offline arm64 test and the loopback HTTPS primary-404 and fallback check.

Approved-by: fengttt <[email protected]>

This branch was previously deployed

1 inactive deployment
ci — 5d37e3ad Deployed Aug 19, 2026 by aptend via Matrixone Utils CI / Coverage #47027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ONNX Runtime 下载的 120 秒上限导致广州 DinD 冷构建稳定失败

2 participants