mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Also install nvidia-ctk in toolkit-container
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
19c20bb422
commit
64b16acb1f
@ -215,6 +215,11 @@ func Install(cli *cli.Context, opts *options) error {
|
|||||||
return fmt.Errorf("error installing NVIDIA container toolkit config: %v", err)
|
return fmt.Errorf("error installing NVIDIA container toolkit config: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_, err = installContainerToolkitCLI(opts.toolkitRoot)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error installing NVIDIA Container Toolkit CLI: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,6 +331,19 @@ func installToolkitConfig(toolkitConfigPath string, nvidiaContainerCliExecutable
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// installContainerToolkitCLI installs the nvidia-ctk CLI executable and wrapper.
|
||||||
|
func installContainerToolkitCLI(toolkitDir string) (string, error) {
|
||||||
|
e := executable{
|
||||||
|
source: "/usr/bin/nvidia-ctk",
|
||||||
|
target: executableTarget{
|
||||||
|
dotfileName: "nvidia-ctk.real",
|
||||||
|
wrapperName: "nvidia-ctk",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.install(toolkitDir)
|
||||||
|
}
|
||||||
|
|
||||||
// installContainerCLI sets up the NVIDIA container CLI executable, copying the executable
|
// installContainerCLI sets up the NVIDIA container CLI executable, copying the executable
|
||||||
// and implementing the required wrapper
|
// and implementing the required wrapper
|
||||||
func installContainerCLI(toolkitRoot string) (string, error) {
|
func installContainerCLI(toolkitRoot string) (string, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user