Skip to content

CPU docker version has nvml.h dependencies #8

Description

@theblackcat102

Hi, I am using the built CPU only docker image as development environment and it seems the module still depends on nvml-go module

sudo docker run --rm -it --name go-onnx-cpu -v $PWD:/go/src/gitlab.com/aiteam c3sr/go-onnxruntime:amd64-cpu-onnxruntime1.7.1-latest

under the environment, when I try to run the go module, this issue shows up. However this is a cpu only onnxruntime build, so we shouldn't be any GPU dependencies here?

/go/pkg/mod/github.com/c3sr/nvml-go@v1.0.0/nvml.go:21:11: fatal error: nvml.h: No such file or directory
 // #include <nvml.h>
           ^~~~~~~~
compilation terminated.

My go test code is as follows:

package main

import (
	"context"
	"path/filepath"
	"github.com/c3sr/dlframework/framework/options"
)

var (
	graph_file = "model.onnx"
	batchSize  = 3
)

func main() {
	dir, _ := filepath.Abs("./_fixtures")
	graph := filepath.Join(dir, graph_file)

	device := options.CPU_DEVICE
	ctx := context.Background()

	opts := options.New(options.Context(ctx),
		options.Graph([]byte(graph)),
		options.Device(device, 0),
		options.BatchSize(batchSize))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions