File tree 4 files changed +42
-17
lines changed
4 files changed +42
-17
lines changed Original file line number Diff line number Diff line change 1
1
# NVIDIA Container Toolkit Changelog
2
2
3
+ * Move ` nvidia-ctk hook ` commands to a separate ` nvidia-cdi-hook ` binary. The same subcommands are supported.
4
+
3
5
## v1.15.0
4
6
5
7
* Remove ` nvidia-container-runtime ` and ` nvidia-docker2 ` packages.
Original file line number Diff line number Diff line change
1
+ /**
2
+ # Copyright 2024 NVIDIA CORPORATION
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ **/
16
+
17
+ package commands
18
+
19
+ import (
20
+ "github.com/urfave/cli/v2"
21
+
22
+ "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/chmod"
23
+ symlinks "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/create-symlinks"
24
+ ldcache "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/update-ldcache"
25
+ "github.com/NVIDIA/nvidia-container-toolkit/internal/logger"
26
+ )
27
+
28
+ // New creates the commands associated with supported CDI hooks.
29
+ // These are shared by the nvidia-cdi-hook and nvidia-ctk hook commands.
30
+ func New (logger logger.Interface ) []* cli.Command {
31
+ return []* cli.Command {
32
+ ldcache .NewCommand (logger ),
33
+ symlinks .NewCommand (logger ),
34
+ chmod .NewCommand (logger ),
35
+ }
36
+ }
Original file line number Diff line number Diff line change @@ -25,9 +25,7 @@ import (
25
25
26
26
cli "github.com/urfave/cli/v2"
27
27
28
- chmod "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/chmod"
29
- symlinks "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/create-symlinks"
30
- ldcache "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/update-ldcache"
28
+ "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/commands"
31
29
)
32
30
33
31
// options defines the options that can be set for the CLI through config files,
@@ -84,11 +82,7 @@ func main() {
84
82
}
85
83
86
84
// Define the subcommands
87
- c .Commands = []* cli.Command {
88
- ldcache .NewCommand (logger ),
89
- symlinks .NewCommand (logger ),
90
- chmod .NewCommand (logger ),
91
- }
85
+ c .Commands = commands .New (logger )
92
86
93
87
// Run the CLI
94
88
err := c .Run (os .Args )
Original file line number Diff line number Diff line change 17
17
package hook
18
18
19
19
import (
20
- chmod "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/chmod "
20
+ "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/commands "
21
21
"github.com/NVIDIA/nvidia-container-toolkit/internal/logger"
22
22
23
23
"github.com/urfave/cli/v2"
24
-
25
- symlinks "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/create-symlinks"
26
- ldcache "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/update-ldcache"
27
24
)
28
25
29
26
type hookCommand struct {
@@ -46,11 +43,7 @@ func (m hookCommand) build() *cli.Command {
46
43
Usage : "A collection of hooks that may be injected into an OCI spec" ,
47
44
}
48
45
49
- hook .Subcommands = []* cli.Command {
50
- ldcache .NewCommand (m .logger ),
51
- symlinks .NewCommand (m .logger ),
52
- chmod .NewCommand (m .logger ),
53
- }
46
+ hook .Subcommands = commands .New (m .logger )
54
47
55
48
return & hook
56
49
}
You can’t perform that action at this time.
0 commit comments