Retry NVIDIA containers without display capability#4006
Open
peterschmidt85 wants to merge 1 commit into
Open
Conversation
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 #4004.
Currently,
dstack-shimasks Docker for this NVIDIAcontainer.DeviceRequest.Capabilitiesset:This is wrong on headless NVIDIA hosts where CUDA works but
/dev/nvidia-modesetis absent. Requestingdisplaymakes NVIDIA Container Runtime fail before the user command starts:The fix keeps the current full capability set on the first start attempt. If an NVIDIA container fails specifically because
/dev/nvidia-modesetis missing, the shim removes the failed container and retries without onlydisplay:NVIDIA documents
displayas X11 display support. The documented default driver capabilities areutility,compute: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.htmlThe fallback applies only to the normal NVIDIA Docker
DeviceRequestpath. AMD, Tenstorrent, Intel, and explicitGPUDeviceshandling are unchanged.AI Assistance: This PR was prepared with AI assistance.