open-nomad/devices/gpu/nvidia/cmd/main.go

21 lines
394 B
Go
Raw Normal View History

package main
import (
"context"
log "github.com/hashicorp/go-hclog"
"github.com/hashicorp/nomad/devices/gpu/nvidia"
"github.com/hashicorp/nomad/plugins"
)
func main() {
// Serve the plugin
plugins.ServeCtx(factory)
}
// factory returns a new instance of the Nvidia GPU plugin
func factory(ctx context.Context, log log.Logger) interface{} {
return nvidia.NewNvidiaDevice(ctx, log)
}