Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU docker version has nvml.h dependencies #8

Open
theblackcat102 opened this issue Dec 29, 2022 · 3 comments
Open

CPU docker version has nvml.h dependencies #8

theblackcat102 opened this issue Dec 29, 2022 · 3 comments

Comments

@theblackcat102
Copy link

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))
}
@yen-hsiang-chang
Copy link
Collaborator

@theblackcat102
Copy link
Author

@yen-hsiang-chang Oh, I forgot to mention, I am using the build docker image from your docker hub c3sr/go-onnxruntime/amd64-cpu-onnxruntime1.7.1-latest

should I built the cpu only image myself instead?

@yen-hsiang-chang
Copy link
Collaborator

You don't need to build your own image. But I believe that if you import the modules in dlframework and only want to use the cpu-only version, you need to add the tags mentioned above when either doing testing or building the go program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants