Repository navigation
devops : reduce Vulkan Docker image to 39.4% of its original size (now 692 MB) - #4038
Merged
danbev merged 5 commits intoSep 21, 2026
Merged
Conversation
Also: - Replace apt-get with apt - Explicitly install ca-certificates
Won't copy compiled tests, source code and other build artifacts.
With this change, arguments passed to `docker run` are forwarded directly to the selected command. Having `bash -c` in the entrypoint will cause additional arguments to be interpreted according to shell command-string semantics, which makes commands such as model downloaders and CLI tools behave unexpectedly unless `--entrypoint` is specified explicitly or the whole command is quoted. Removing it restores the conventional Docker behavior of: `docker run IMAGE COMMAND ARG...` passing `ARG` to `COMMAND` (not to `bash`).
danbev
approved these changes
Sep 21, 2026
Contributor
Author
|
@danbev thanks for the review! Should I create one more PR for the other Dockerfiles? |
Member
I think it would be best to do them as separate PRs. Thanks! |
bygreencn
added a commit
to bygreencn/whisper.cpp
that referenced
this pull request
Sep 23, 2026
* ggerganov/master: vad : reject n_encoder_layers other than 4 in model load (ggml-org#4064) devops : reduce Vulkan Docker image to 39.4% of its original size (now 692 MB) (ggml-org#4038)
7h145
added a commit
to 7h145/whisperer
that referenced
this pull request
Oct 5, 2026
Upstream commit 307869a (PR#4038, merged 2026-09-21) moved executables and model downloaders into /usr/local/bin, but only for the Vulkan image. The CUDA image still uses /app/build/bin and /app/models. Upstream has welcomed follow-up PRs for the other Dockerfiles, but there is no committed plan or timetable for converging the published images on a common layout. Moving tools to /usr/local/bin is sensible; changing only one image leaves consumers handling an avoidable split. I'm not impressed with how this change was coordinated. Select tools by name and use an inline Bash entrypoint that appends the legacy directories to the image's PATH. Existing PATH entries take precedence; exec preserves argument boundaries and signal handling. Keep mode-specific arguments and setup together in the command case branches, removing nameref indirection and manual entrypoint JSON construction. Upstream: ggml-org/whisper.cpp#4038
7h145
added a commit
to 7h145/whisperer
that referenced
this pull request
Oct 5, 2026
Upstream commit 307869a (PR #4038, merged 2026-09-21) introduced leaner runtime packaging and a /usr/local layout for the Vulkan image, but left CUDA on the old layout. Having accommodated that split in whisper.sh, follow the cleaner convention in our local SDL/CUDA image. Use the Vulkan staging approach rather than carrying the source checkout and build debris into the runtime image. Keep the CUDA build unchanged and retain the dependencies needed for streaming and model downloads. Explicitly clear NVIDIA's inherited entrypoint to match Vulkan's conventional direct-command behavior. Upstream welcomed follow-up PRs but has no committed convergence timetable. Reusing its existing packaging keeps our change small and easy to compare with a future CUDA update; broader alignment can wait. Upstream: ggml-org/whisper.cpp#4038
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.
The current Vulkan Docker image is 1.75 GB. Making it smaller not only reduces download and storage requirements, but can also make the image faster to build and distribute. This PR applies 4 changes to
main-vulkan.Dockerfile, reducing the final image size from 1.75 GB to 692 MB (39.4% of the original size). The build time also decreased from 2m41s to 2m16s (84.4% of the original).These were the main contributors to the current image size:
base.enmodel)I also made a couple of improvements:
aptinstead ofapt-getbash -cas the entrypointI'm willing to apply the same changes to the other Dockerfiles in the repository if the maintainers approve this approach. I started with the Vulkan image because it's the one I use.
Result:
Notes:
libsdl2-dev(removed in the second commit): commit bea43e0 (not mine) introduced this package in the runtime image, but since it's not required for production use, I think it should instead be installed by users who need it in an image derived from this one.docker runcommands from the README using the final Dockerfile in this PR and everything worked as expected (the examples were also fixed/extended).