Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjackson committed Apr 5, 2024
1 parent 45c329e commit b149d7d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pkg/clients/container/docker_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,19 +187,20 @@ func (d *DockerTasks) CreateContainer(c *dtypes.Container) (string, error) {
}

hc.Resources = rc
}

// Add GPU details
if c.Resources.GPU != nil {
hc.DeviceRequests = []container.DeviceRequest{
{
Driver: c.Resources.GPU.Driver,
DeviceIDs: c.Resources.GPU.DeviceIDs,
Capabilities: [][]string{[]string{"gpu", c.Resources.GPU.Driver, "compute"}},
},
if c.Resources.GPU != nil {
hc.DeviceRequests = []container.DeviceRequest{
{
Driver: c.Resources.GPU.Driver,
DeviceIDs: c.Resources.GPU.DeviceIDs,
Capabilities: [][]string{[]string{"gpu", c.Resources.GPU.Driver, "compute"}},
},
}
}
}

// Add GPU details

// by default the container should NOT be attached to a network
nc.EndpointsConfig = make(map[string]*network.EndpointSettings)

Expand Down

0 comments on commit b149d7d

Please sign in to comment.