github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/devices/gpu/nvidia/cmd/main.go (about)

     1  package main
     2  
     3  import (
     4  	log "github.com/hashicorp/go-hclog"
     5  
     6  	"github.com/hashicorp/nomad/devices/gpu/nvidia"
     7  	"github.com/hashicorp/nomad/plugins"
     8  )
     9  
    10  func main() {
    11  	// Serve the plugin
    12  	plugins.Serve(factory)
    13  }
    14  
    15  // factory returns a new instance of the Nvidia GPU plugin
    16  func factory(log log.Logger) interface{} {
    17  	return nvidia.NewNvidiaDevice(log)
    18  }