Skip to content

Commit eb73692

Browse files
committed
build, pkg/nvidia: Bump NVIDIA Container Toolkit to 1.17.5
NVIDIA Container Toolkit 1.17.5 requires Go >= 1.22 [1], and starts using enable-cuda-compat hooks in the Container Device Interface specification generated by it [2]. For example: "hookName": "createContainer", "path": "/usr/bin/nvidia-cdi-hook", "args": [ "nvidia-cdi-hook", "enable-cuda-compat", "--host-driver-version=570.153.02" ] The new hook makes it possible to have containers with a /usr/local/cuda/compat/libcuda.so.* that's newer than the proprietary NVIDIA driver on the host operating system, so that applications can use a newer CUDA without having to update the driver [3]. Even though this sounds useful, the hook has been disabled until it's handled by the 'init-container' command and there's a clear way to test it. The src/go.sum file was updated with 'go mod tidy'. [1] NVIDIA Container Toolkit commit 5bdf14b1e7c24763 NVIDIA/nvidia-container-toolkit@5bdf14b1e7c24763 NVIDIA/nvidia-container-toolkit#941 NVIDIA/nvidia-container-toolkit#950 [2] NVIDIA Container Toolkit commit 76040ff2ad63fb82 NVIDIA/nvidia-container-toolkit@76040ff2ad63fb82 NVIDIA/nvidia-container-toolkit#906 NVIDIA/nvidia-container-toolkit#948 [3] https://docs.nvidia.com/deploy/cuda-compatibility/ containers#1662
1 parent a49f70e commit eb73692

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module github.com/containers/toolbox
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/HarryMichal/go-version v1.0.1
77
github.com/NVIDIA/go-nvlib v0.7.1
88
github.com/NVIDIA/go-nvml v0.12.4-1
9-
github.com/NVIDIA/nvidia-container-toolkit v1.17.4
9+
github.com/NVIDIA/nvidia-container-toolkit v1.17.5
1010
github.com/acobaugh/osrelease v0.1.0
1111
github.com/briandowns/spinner v1.23.2
1212
github.com/docker/go-units v0.5.0

src/go.sum

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ github.com/NVIDIA/go-nvlib v0.7.1 h1:7HHPZxoCjSLm1NgaRRjuhI8ffMCpc5Vgpg5yxQYUff8
5555
github.com/NVIDIA/go-nvlib v0.7.1/go.mod h1:2Kh2kYSP5IJ8EKf0/SYDzHiQKb9EJkwOf2LQzu6pXzY=
5656
github.com/NVIDIA/go-nvml v0.12.4-1 h1:WKUvqshhWSNTfm47ETRhv0A0zJyr1ncCuHiXwoTrBEc=
5757
github.com/NVIDIA/go-nvml v0.12.4-1/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ=
58-
github.com/NVIDIA/nvidia-container-toolkit v1.17.4 h1:6S67r55wiPJm3GrfsSNJt0+qIbj1/X2OEgVoU05JrM0=
59-
github.com/NVIDIA/nvidia-container-toolkit v1.17.4/go.mod h1:noSlm+fO6wugg5Ku8tAdfFJeBf46ViCBpiH89ADispY=
58+
github.com/NVIDIA/nvidia-container-toolkit v1.17.5 h1:aIE12dFRAG4xAp00vHoh9O1JL8onuldwMrX/GNSZy9Q=
59+
github.com/NVIDIA/nvidia-container-toolkit v1.17.5/go.mod h1:UQcbm+GRu+Dwmeyqtwq2HDa57Xq82zzQsmUusidtndM=
6060
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
6161
github.com/acobaugh/osrelease v0.1.0 h1:Yb59HQDGGNhCj4suHaFQQfBps5wyoKLSSX/J/+UifRE=
6262
github.com/acobaugh/osrelease v0.1.0/go.mod h1:4bFEs0MtgHNHBrmHCt67gNisnabCRAlzdVasCEGHTWY=
@@ -326,9 +326,8 @@ github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU
326326
github.com/opencontainers/runtime-spec v1.2.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
327327
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0=
328328
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI=
329+
github.com/opencontainers/selinux v1.9.1 h1:b4VPEF3O5JLZgdTDBmGepaaIbAo0GqoF6EBRq5f/g3Y=
329330
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
330-
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
331-
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
332331
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
333332
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
334333
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=

src/pkg/nvidia/nvidia.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2024 Red Hat Inc.
2+
* Copyright © 2024 – 2025 Red Hat Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -99,7 +99,10 @@ func GenerateCDISpec() (*specs.Spec, error) {
9999
return nil, ErrPlatformUnsupported
100100
}
101101

102-
cdi, err := nvcdi.New(nvcdi.WithInfoLib(info), nvcdi.WithLogger(logger), nvcdi.WithNvmlLib(nvmLib))
102+
cdi, err := nvcdi.New(nvcdi.WithDisabledHook(nvcdi.HookEnableCudaCompat),
103+
nvcdi.WithInfoLib(info),
104+
nvcdi.WithLogger(logger),
105+
nvcdi.WithNvmlLib(nvmLib))
103106
if err != nil {
104107
logrus.Debugf("Generating Container Device Interface for NVIDIA: failed to create library: %s", err)
105108
return nil, errors.New("failed to create Container Device Interface library for NVIDIA")

0 commit comments

Comments
 (0)