NVIDIA / dcgm-exporter

NVIDIA GPU metrics exporter for Prometheus leveraging DCGM
Apache License 2.0
864 stars 153 forks source link

Error with "make binary" operation in local development #381

Open kschoi93 opened 1 month ago

kschoi93 commented 1 month ago

What is the version?

3.3.7-3.5.0

What happened?

this repository needs to edit its ".gitignore" for local development

develop dcgm exporter -> git commit & push -> git pull from another docker -> dcgm bianry or install -> error


make binary

root@dcgm-exporter-vzjgc:/custom-dcgm-exporter# make binary
...
go.uber.org/mock/mockgen
Updating DCGM version in files from 3.3.6 to 3.3.7...
Updating DCGM Exporter version in files from 3.4.2 to 3.5.0...
cd cmd/dcgm-exporter; go build -ldflags "-X main.BuildVersion=3.3.7-3.5.0"
/bin/sh: 1: cd: can't cd to cmd/dcgm-exporter
no Go files in /dcgm-exporter
make: *** [Makefile:36: binary] Error 1

check directory

root@dcgm-exporter-vzjgc:/dcgm-exporter# ll
total 208
drwxr-xr-x 16 root root  4096 Aug 30 02:13 ./
drwxr-xr-x  1 root root  4096 Aug 30 02:07 ../
drwxr-xr-x  2 root root  4096 Aug 30 02:07 .devcontainer/
drwxr-xr-x  8 root root  4096 Aug 30 02:14 .git/
drwxr-xr-x  4 root root  4096 Aug 30 02:07 .github/
-rw-r--r--  1 root root  5418 Aug 30 02:13 .gitignore
-rw-r--r--  1 root root     0 Aug 30 02:07 .gitmodules
-rw-r--r--  1 root root   283 Aug 30 02:07 .golangci.yml
drwxr-xr-x  2 root root  4096 Aug 30 02:07 .vscode/
-rw-r--r--  1 root root  2242 Aug 30 02:07 CONTRIBUTING.md
-rw-r--r--  1 root root  1543 Aug 30 02:07 Jenkinsfile
-rw-r--r--  1 root root 11358 Aug 30 02:07 LICENSE
-rw-r--r--  1 root root  4525 Aug 30 02:12 Makefile
-rw-r--r--  1 root root  8545 Aug 30 02:12 README.md
-rw-r--r--  1 root root  1004 Aug 30 02:07 RELEASE.md
-rw-r--r--  1 root root  2082 Aug 30 02:12 dcgm-exporter.yaml
drwxr-xr-x  3 root root  4096 Aug 30 02:12 deployment/
drwxr-xr-x  2 root root  4096 Aug 30 02:07 docker/
drwxr-xr-x  2 root root  4096 Aug 30 02:07 etc/
-rw-r--r--  1 root root  8390 Aug 30 02:07 go.mod
-rw-r--r--  1 root root 58939 Aug 30 02:07 go.sum
drwxr-xr-x  2 root root  4096 Aug 30 02:07 grafana/
drwxr-xr-x  2 root root  4096 Aug 30 02:07 hack/
drwxr-xr-x  4 root root  4096 Aug 30 02:12 internal/
drwxr-xr-x  5 root root  4096 Aug 30 02:07 pkg/
drwxr-xr-x  2 root root  4096 Aug 30 02:07 scripts/
-rw-r--r--  1 root root  3368 Aug 30 02:07 secuity.md
-rw-r--r--  1 root root   972 Aug 30 02:12 service-monitor.yaml
-rw-r--r--  1 root root    27 Aug 30 02:07 staticcheck.conf
drwxr-xr-x  4 root root  4096 Aug 30 02:12 tests/

# *not found cmd directory
# It applies to both files and folders because the character "dcgm-exporter" is written to the .gitignore file.
cmd/dcgm-exporter/dcgm-exporter
cmd/dcgm-exporter/main.go

What did you expect to happen?

"make binary" success

What is the GPU model?

No response

What is the environment?

No response

How did you deploy the dcgm-exporter and what is the configuration?

No response

How to reproduce the issue?

local development -> git commit & push -> git pull on another local -> make binary

Anything else we need to know?

No response