}, err
}
-func (e *dockerExecutor) Runtime() string { return "docker" }
+func (e *dockerExecutor) Runtime() string {
+ v, _ := e.dockerclient.ServerVersion(context.Background())
+ info := ""
+ for _, cv := range v.Components {
+ if info != "" {
+ info += ", "
+ }
+ info += cv.Name + " " + cv.Version
+ }
+ if info == "" {
+ info = "(unknown version)"
+ }
+ return "docker " + info
+}
func (e *dockerExecutor) LoadImage(imageID string, imageTarballPath string, container arvados.Container, arvMountPoint string,
containerClient *arvados.Client) error {
}
if spec.CUDADeviceCount != 0 {
var deviceIds []string
- for _, s := range os.Environ() {
+ if cudaVisibleDevices := os.Getenv("CUDA_VISIBLE_DEVICES"); cudaVisibleDevices != "" {
// If a resource manager such as slurm or LSF told
// us to select specific devices we need to propagate that.
- if strings.HasPrefix(s, "CUDA_VISIBLE_DEVICES=") {
- deviceIds = strings.Split(strings.SplitN(s, "=", 2)[1], ",")
- }
+ deviceIds = strings.Split(cudaVisibleDevices, ",")
}
+
deviceCount := spec.CUDADeviceCount
if len(deviceIds) > 0 {
// Docker won't accept both non-empty
for {
select {
case waitBody := <-waitOk:
- e.logf("Container exited with code: %v", waitBody.StatusCode)
// wait for stdout/stderr to complete
<-e.doneIO
return int(waitBody.StatusCode), nil