Repository navigation
feat(computer): put Vulkan on the image, with a Venus driver that works on an Apple silicon host - #1813
Merged
Conversation
…ks on an Apple silicon host
Contributor
|
🎉 This PR is included in version 0.256.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
The computer image gets Vulkan, so an app on a computer uses the host's GPU when the pod is given one and nobody has to install a driver through user data first.
libvulkan1,mesa-vulkan-driversandvulkan-toolsgo on the image, about 145 MB on disk. On arm64 Mesa's Venus driver is replaced by one built with a downstream change for the 16 KiB memory pages of an Apple silicon host. Ubuntu's build fails there withERROR_OUT_OF_HOST_MEMORY, and an Apple silicon Mac is the one place an arm64 computer gets a GPU today. amd64 keeps Ubuntu's driver.Found while running the drone footage example of the desktop app (inference-gateway/desktop#537), which had to build its own image for this. inference-gateway/desktop#536 is the other half - giving the pod the GPU device.
Changes
computer/Dockerfile- the three packages, and avenusstage that buildslibvulkan_virtio.sofrom Ubuntu's Mesa source with the patch, on arm64 onlycomputer/venus-16k.patch- the downstream change, vendored so a release does not depend on freedesktop's GitLab. From https://gitlab.freedesktop.org/slp/mesa/-/commit/761ef1ec5ff2aae1cc3dc8bbc22b3d06ef04b549.gitattributes- the patch keeps its whitespacedocs/computer-use.md- says Vulkan is on the imageVerified
task container:build:computer. Thevenusstage takes under a minute nativelyinferwith nothing installed,vulkaninfo --summarylistsVirtio-GPU Venus (Apple M4 Pro)as an integrated GPU ahead ofllvmpipellvmpipealoneNot verified