mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-24 13:05:51 +00:00
Merge pull request #1582 from balena-io/rgz/gpu-label
Fix gpu label support
This commit is contained in:
commit
cfc72e673b
@ -402,8 +402,11 @@ export async function addFeaturesFromLabels(
|
||||
// bahavior of docker cli
|
||||
// https://github.com/balena-os/balena-engine-cli/blob/19.03-balena/opts/gpus.go#L81-L89
|
||||
service.config.deviceRequests.push({
|
||||
Driver: '',
|
||||
Count: 1,
|
||||
DeviceIDs: [],
|
||||
Capabilities: [['gpu']],
|
||||
Options: {},
|
||||
} as Dockerode.DeviceRequest),
|
||||
};
|
||||
|
||||
|
@ -503,8 +503,11 @@ describe('compose/service', () => {
|
||||
|
||||
describe('io.balena.features.gpu: Docker <-> Compose config', () => {
|
||||
const gpuDeviceRequest = {
|
||||
Driver: '',
|
||||
DeviceIDs: [],
|
||||
Count: 1,
|
||||
Capabilities: [['gpu']],
|
||||
Options: {},
|
||||
};
|
||||
it('should succeed from compose object', async () => {
|
||||
const s = await Service.fromComposeObject(
|
||||
|
Loading…
x
Reference in New Issue
Block a user