[ARVADOS] updated: 2.1.0-1815-g83864f0f7
Git user
git at public.arvados.org
Fri Jan 7 22:56:51 UTC 2022
Summary of changes:
lib/crunchrun/docker.go | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
via 83864f0f77a37ef8212fd4c3eca268ae9bad4bbb (commit)
from 042f47a2c6b5f3db80142164b6493c873aca0b26 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 83864f0f77a37ef8212fd4c3eca268ae9bad4bbb
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Fri Jan 7 17:56:08 2022 -0500
12630: request both 'compute' and 'utility' nvidia capabilities
Add note about capabilities.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/lib/crunchrun/docker.go b/lib/crunchrun/docker.go
index f437d6a0c..ea9d44821 100644
--- a/lib/crunchrun/docker.go
+++ b/lib/crunchrun/docker.go
@@ -119,14 +119,29 @@ func (e *dockerExecutor) config(spec containerSpec) (dockercontainer.Config, doc
if len(deviceIds) > 0 {
// Docker won't accept both non-empty
// DeviceIDs and a non-zero Count
+ //
+ // (it turns out "Count" is a dumb fallback
+ // that just allocates device 0, 1, 2, ...,
+ // Count-1)
deviceCount = 0
}
+ // Capabilities are confusing. The driver has generic
+ // capabilities "gpu" and "nvidia" but then there's
+ // additional capabilities "compute" and "utility"
+ // that are passed to nvidia-container-cli.
+ //
+ // "compute" means include the CUDA libraries and
+ // "utility" means include the CUDA utility programs
+ // (like nvidia-smi).
+ //
+ // https://github.com/moby/moby/blob/7b9275c0da707b030e62c96b679a976f31f929d3/daemon/nvidia_linux.go#L37
+ // https://github.com/containerd/containerd/blob/main/contrib/nvidia/nvidia.go
hostCfg.Resources.DeviceRequests = append(hostCfg.Resources.DeviceRequests, dockercontainer.DeviceRequest{
Driver: "nvidia",
Count: deviceCount,
DeviceIDs: deviceIds,
- Capabilities: [][]string{[]string{"gpu", "nvidia"}},
+ Capabilities: [][]string{[]string{"gpu", "nvidia", "compute", "utility"}},
})
}
for path, mount := range spec.BindMounts {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list