2018-09-01 00:08:36 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
log "github.com/hashicorp/go-hclog"
|
|
|
|
|
2018-10-05 20:50:18 +00:00
|
|
|
"github.com/hashicorp/nomad/devices/gpu/nvidia"
|
2018-09-01 00:08:36 +00:00
|
|
|
"github.com/hashicorp/nomad/plugins"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
// Serve the plugin
|
|
|
|
plugins.Serve(factory)
|
|
|
|
}
|
|
|
|
|
|
|
|
// factory returns a new instance of the Nvidia GPU plugin
|
|
|
|
func factory(log log.Logger) interface{} {
|
|
|
|
return nvidia.NewNvidiaDevice(log)
|
|
|
|
}
|