Remove the orphaned onnxruntime Dockerfiles - #14360
Open
guptaishaan wants to merge 1 commit into
Open
Conversation
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
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.
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, sodocker/has advertised two images for thirteen months that neither job inbuild_docker_images.ymlbuilds.This PR deletes
docker/diffusers-onnxruntime-cpu/anddocker/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_testsis commented out innightly_tests.yml, andgrep -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 underdocker/are exactly the images named in both jobs of the workflow, the PR-timeALLOWED_IMAGESarray and the nightlystrategy.matrix.image-namelist. 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:
tests/othersis 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 checkover the projectcheck_dirsandruff format --check testsboth cleanNot 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:latestanddiffusers/diffusers-onnxruntime-cuda:latestwill 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.