mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 04:54:00 +00:00
3b27d91026
This change replaces the reference to gitlab.com/nvidia/cloud-native/container-toolkit with github.com/NVIDIA/nvidia-container-toolkit matching this project. Signed-off-by: Evan Lezar <elezar@nvidia.com>
27 lines
549 B
Go
27 lines
549 B
Go
package main
|
|
|
|
import (
|
|
"github.com/NVIDIA/nvidia-container-toolkit/internal/ldcache"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
var logger = log.StandardLogger()
|
|
|
|
func main() {
|
|
logger.SetLevel(log.DebugLevel)
|
|
logger.Infof("Starting device discovery with NVML")
|
|
|
|
cache, err := ldcache.NewLDCacheWithLogger(logger, "/run/nvidia/driver")
|
|
if err != nil {
|
|
logger.Errorf("Error loading ldcache: %v", err)
|
|
return
|
|
}
|
|
defer cache.Close()
|
|
|
|
libs32, libs64 := cache.Lookup("lib")
|
|
|
|
logger.Infof("32-bit: %v", libs32)
|
|
logger.Infof("64-bit: %v", libs64)
|
|
|
|
}
|