mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-29 07:21:46 +00:00
Move IPC discoverer to internal/discover package
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
3f70521a63
commit
3b8c40c3e6
@ -234,7 +234,7 @@ func (m command) generateSpec(driverRoot string, nvidiaCTKPath string, namer dev
|
|||||||
|
|
||||||
allEdits := edits.NewContainerEdits()
|
allEdits := edits.NewContainerEdits()
|
||||||
|
|
||||||
ipcs, err := NewIPCDiscoverer(m.logger, driverRoot)
|
ipcs, err := discover.NewIPCDiscoverer(m.logger, driverRoot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to create discoverer for IPC sockets: %v", err)
|
return nil, fmt.Errorf("failed to create discoverer for IPC sockets: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -14,17 +14,16 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
package generate
|
package discover
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/discover"
|
|
||||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/lookup"
|
"github.com/NVIDIA/nvidia-container-toolkit/internal/lookup"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewIPCDiscoverer creats a discoverer for NVIDIA IPC sockets.
|
// NewIPCDiscoverer creats a discoverer for NVIDIA IPC sockets.
|
||||||
func NewIPCDiscoverer(logger *logrus.Logger, driverRoot string) (discover.Discover, error) {
|
func NewIPCDiscoverer(logger *logrus.Logger, driverRoot string) (Discover, error) {
|
||||||
d := discover.NewMounts(
|
d := NewMounts(
|
||||||
logger,
|
logger,
|
||||||
lookup.NewFileLocator(
|
lookup.NewFileLocator(
|
||||||
lookup.WithLogger(logger),
|
lookup.WithLogger(logger),
|
Loading…
Reference in New Issue
Block a user