(params: DockerResolverParameters, info: any, expectedLabels: Record<string, string>)
| 244 | } |
| 245 | |
| 246 | async function hasLabels(params: DockerResolverParameters, info: any, expectedLabels: Record<string, string>) { |
| 247 | const actualLabels = info.Actor?.Attributes |
| 248 | // Docker uses 'id', Podman 'ID'. |
| 249 | || (await inspectContainer(params, info.id || info.ID)).Config.Labels |
| 250 | || {}; |
| 251 | return Object.keys(expectedLabels) |
| 252 | .every(name => actualLabels[name] === expectedLabels[name]); |
| 253 | } |
| 254 | |
| 255 | export async function checkDockerSupportForGPU(params: DockerResolverParameters): Promise<Boolean> { |
| 256 | if (params.gpuAvailability === 'all') { |
no test coverage detected