fix: avoid duplicated driver volumes for GPUs #1864
Merged
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.
Now we're storing whole information required to mount single GPU into a container inside the
sonm.GPUDevice
structure. and now we can turn up into a situation, when we're trying to mount more than one GPU with the same type. The Tuner will try to attach more than one (absolutely same) volume to the container. In that case, it will lead to the container' start failure.This PR fixes that behavior by collecting proposed mount points into the set, and then applying only non-repeated ones.