You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// HasCreateSubcommand checks the supplied arguments for a 'create' subcommand
func HasCreateSubcommand(args []string) bool {
var previousWasBundle bool
for _, a := range args {
// We check for '--bundle create' explicitly to ensure that we
// don't inadvertently trigger a modification if the bundle directory
// is specified as `create`
if !previousWasBundle && IsBundleFlag(a) {
previousWasBundle = true
continue
}
if !previousWasBundle && a == "create" {
return true
}
previousWasBundle = false
}
return false
}
As far as I can tell, the only way this function will ever return true is if you run sudo nvidia-container-runtime create first. I think the intention was that if you specify --bundle explicitly it would also work? Not sure, it's a bit hard understand what the bundle flag stuff actually accomplishes.
In any event, I thought I'd file an issue incase someone else runs apon this and wonders why it doesn't work. Once you run create the spec gets modified properly and you can use it with 'run' if you want.
The text was updated successfully, but these errors were encountered:
Same here. I was trying nvidia-container-runtime run ubuntu, but it turned out config.json left unmodified. The code mentioned above ignores all subcommands except create.
I think that's why the example doesn't work anymore. Has support for nvidia-container-runtime run <container_id> been intentionally deprecated?
The nvidia-container-runtime usage example is broke/incorrect: https://github.com/NVIDIA/nvidia-container-toolkit/tree/main/cmd/nvidia-container-runtime#usage-example
It doesn't work and if you set the log level to 'trace' and you look in the logs you'll find:
time="2024-11-08T12:50:03-05:00" level=trace msg="Skipping modifier for non-create subcommand"
This is caused by the this function:
func HasCreateSubcommand(args []string) bool {
Here's the code
As far as I can tell, the only way this function will ever return true is if you run
sudo nvidia-container-runtime create
first. I think the intention was that if you specify --bundle explicitly it would also work? Not sure, it's a bit hard understand what the bundle flag stuff actually accomplishes.In any event, I thought I'd file an issue incase someone else runs apon this and wonders why it doesn't work. Once you run create the spec gets modified properly and you can use it with 'run' if you want.
The text was updated successfully, but these errors were encountered: