Skip to content

Remove the orphaned onnxruntime Dockerfiles - #14360

Open
guptaishaan wants to merge 1 commit into
huggingface:mainfrom
guptaishaan:fix-14325
Open

Remove the orphaned onnxruntime Dockerfiles#14360
guptaishaan wants to merge 1 commit into
huggingface:mainfrom
guptaishaan:fix-14325

Conversation

@guptaishaan

Copy link
Copy Markdown

Fixes #14325

#11803 removed onnx and flax from the docker build matrix on 2025-06-27, which is exactly the freeze date measured in the issue. #12151 finished the flax half by deleting docker/diffusers-flax-*, but the two onnxruntime directories were left on disk, so docker/ has advertised two images for thirteen months that neither job in build_docker_images.yml builds.

This PR deletes docker/diffusers-onnxruntime-cpu/ and docker/diffusers-onnxruntime-cuda/, mirroring what was already done for flax.

I went with removal rather than re-adding the two names to the matrix because the repo says the removal was intentional: #11803 gives a rationale, every test workflow still filters ONNX out with -k "not Onnx", run_nightly_onnx_tests is commented out in nightly_tests.yml, and grep -rn diffusers-onnxruntime . returns nothing outside the two directories themselves. If that reading is wrong and you want the images kept, the opposite fix is two lines in each of the two lists and the test below passes either way, it asserts the two sides agree, not which way.

Also adds tests/others/test_docker_images.py, which checks that the directories under docker/ are exactly the images named in both jobs of the workflow, the PR-time ALLOWED_IMAGES array and the nightly strategy.matrix.image-name list. It fails on both jobs before this change, naming the two onnxruntime images, and passes after. This is the guard that would have caught the drift on the next nightly.

Verified on Linux, CPU only, no GPU work involved:

  • new test fails before the deletion, passes after, checked by reverting and restoring
  • tests/others is green apart from 3 failures that also fail on a clean tree (test_is_copy_consistent, test_toplevel_help_lists_all_commands, test_deprecate_stacklevel)
  • ruff check over the project check_dirs and ruff format --check tests both clean

Not verified: I have no Docker daemon here, so I did not build either image and did not reproduce any of the CVE scanning in the issue. More importantly, this does not touch Docker Hub. diffusers/diffusers-onnxruntime-cpu:latest and diffusers/diffusers-onnxruntime-cuda:latest will keep handing out the June 2025 build until someone with registry credentials deletes or deprecates those tags. I also did not determine who still pulls them.

Thanks to @kobihikri for the report, for checking both jobs rather than assuming they matched, and for being explicit about what they had and had not established.

huggingface#11803 dropped onnx and flax from the docker build matrix in
build_docker_images.yml. huggingface#12151 finished the flax half by deleting
docker/diffusers-flax-*, but the two onnxruntime directories were left
behind, so docker/ has listed two images for thirteen months that
neither job in the workflow builds. Their :latest tags on Docker Hub
have been frozen since 2025-06-27 as a result.

Delete docker/diffusers-onnxruntime-cpu and
docker/diffusers-onnxruntime-cuda, mirroring what was done for flax.
Nothing else in the repo references them: every test workflow filters
ONNX out with -k "not Onnx", run_nightly_onnx_tests is commented out,
and no doc or script names the images.

Add tests/others/test_docker_images.py, which asserts that the
directories under docker/ are exactly the images named in both jobs of
build_docker_images.yml, the PR-time ALLOWED_IMAGES array and the
nightly strategy.matrix.image-name list. It fails on both before this
change and passes after.

This does not remove the stale tags from Docker Hub, which needs
registry credentials.

Fixes huggingface#14325
@github-actions github-actions Bot added tests size/M PR with diff < 200 LOC fixes-issue labels Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes-issue size/M PR with diff < 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two ONNX Docker images are missing from build_docker_images.yml, so their :latest tags have been frozen since June 2025

1 participant