mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Use NewContainerEdits utility function for CDI generation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
3140810c95
commit
41f1b93422
@ -208,7 +208,7 @@ func (m command) generateSpec(root string) (*specs.Spec, error) {
|
|||||||
|
|
||||||
deviceSpecs = append(deviceSpecs, allDevice)
|
deviceSpecs = append(deviceSpecs, allDevice)
|
||||||
|
|
||||||
allEdits := cdi.ContainerEdits{}
|
allEdits := edits.NewContainerEdits()
|
||||||
|
|
||||||
ipcs, err := NewIPCDiscoverer(m.logger, root)
|
ipcs, err := NewIPCDiscoverer(m.logger, root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -316,7 +316,7 @@ func (m command) generateDeviceSpecs(devicelib device.Interface, root string) ([
|
|||||||
|
|
||||||
// createAllDevice creates an 'all' device which combines the edits from the previous devices
|
// createAllDevice creates an 'all' device which combines the edits from the previous devices
|
||||||
func createAllDevice(deviceSpecs []specs.Device) specs.Device {
|
func createAllDevice(deviceSpecs []specs.Device) specs.Device {
|
||||||
edits := cdi.ContainerEdits{}
|
edits := edits.NewContainerEdits()
|
||||||
|
|
||||||
for _, d := range deviceSpecs {
|
for _, d := range deviceSpecs {
|
||||||
edit := cdi.ContainerEdits{
|
edit := cdi.ContainerEdits{
|
||||||
|
Loading…
Reference in New Issue
Block a user