fix Gpus null issue (#8692)

pull/8705/head
Prabhat Khera 2 years ago committed by GitHub
parent 124e0bf9b9
commit f6e8b25cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -179,6 +179,8 @@ export default class DockerFeaturesConfigurationController {
disableSysctlSettingForRegularUsers: !securitySettings.allowSysctlSettingForRegularUsers,
};
// this.endpoint.Gpus could be null as it is Gpus: []Pair in the API
this.endpoint.Gpus = this.endpoint.Gpus || [];
this.state.enableGPUManagement = this.isDockerStandaloneEnv && (this.endpoint.EnableGPUManagement || this.endpoint.Gpus.length > 0);
this.initialGPUs = this.endpoint.Gpus;
this.initialEnableGPUManagement = this.endpoint.EnableGPUManagement;

Loading…
Cancel
Save