[Bug]: nvidia-ctk runtime configure --runtime=docker without --set-as-default leaves default-runtime set to nvidia
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 30/100
Línea de trabajo
Start with pkg/config/engine/docker/docker.go and the existing Docker unit test for Config{"default-runtime": "nvidia"}.AddRuntime("nvidia", path, false). Compare the behavior with the containerd and cri-o changes from #1256. Done means the Docker configuration clears default-runtime in this case and the unit test verifies it; pull request #2156 is already open for this fix.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
#1256 (cab76e2d) changed AddRuntime for containerd and cri-o to clear the default runtime when the runtime being added is the current default and setAsDefault is false. The docker implementation in pkg/config/engine/docker/docker.go was not changed: it only sets default-runtime when setAsDefault is true and leaves an existing value alone otherwise.
So after the NVIDIA runtime was made the docker default once (--set-as-default, or the toolkit container with set-as-default enabled), configuring it again with set-as-default off keeps "default-runtime": "nvidia" in daemon.json, and every docker container keeps running through the NVIDIA runtime. With the same steps, containerd and cri-o go back to their own default.
To Reproduce
Found by reading the code and confirmed with a unit test on main (44f1c6ef): Config{"default-runtime": "nvidia"}.AddRuntime("nvidia", path, false) leaves default-runtime as nvidia.
Expected on a host (not run):
nvidia-ctk runtime configure --runtime=docker --set-as-defaultnvidia-ctk runtime configure --runtime=docker/etc/docker/daemon.jsonstill has"default-runtime": "nvidia".
Expected behavior
Docker behaves like containerd and cri-o: when the runtime being configured is the current default and set-as-default is off, default-runtime is removed and docker falls back to its own default (runc).
One thing for the maintainers to decide: this changes behaviour for anyone who set default-runtime: nvidia by hand and later runs nvidia-ctk runtime configure --runtime=docker without --set-as-default. That is the same trade-off #1256 made for containerd and cri-o, but it may matter more for docker users. A fix that mirrors #1256 is in #2156.
Environment (please provide the following information):
- NVIDIA Container Toolkit version: main at 44f1c6ef; the same code is in v1.20.1
- NVIDIA Driver Version, host OS, kernel, container runtime: not run on a host; reproduced with the
pkg/config/engine/dockerunit tests (Go 1.27.2, macOS arm64)
- Lenguaje dominante
- Go
- Estrellas
- 4.6k
- Forks
- 612
- Merge medio
- 3 d 8 h
- PR fusionados (30 d)
- 36
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/nvidia-container-toolkit
-
[Bug]: Containers with NVIDIA_VISIBLE_DEVICES=all fail to start in jit-cdi mode when every GPU is bound to vfio-pciPosiblemente ocupada @efegokdemir la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
NVIDIA/nvidia-container-toolkit#2163 ·
Los mantenedores suelen responder en 1 día
-
Address TODO comments in internal/platform-support/dgpu/dgpu.goPosiblemente ocupada @truongbo17 la tomó hace 34 días. Abiertodsx-ws-0930 good-first-issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/nvidia-container-toolkit#2114 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
NVIDIA/nvidia-container-toolkit#2197 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Containerized installer removes the existing Toolkit installation before the replacement is complete and durablePosiblemente ocupada @henry118 la tomó hace 14 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
NVIDIA/nvidia-container-toolkit#2153 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
NVIDIA/nvidia-container-toolkit#2147 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA/nvidia-container-toolkit
Issues similares
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cli/cli#14946 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
WriterSetTimes: the UTIME_NOW check fails when the kernel uses its coarse clockPosiblemente ocupada @JakeChampion la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
JakeChampion/lang#14224 ·
Los mantenedores suelen responder en 1 día
-
docs(reference): pi stream-filter bullet says tool_execution_update passes through unchangedAbiertoagent-butler-finding bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jordansmall/spindrift#6391 ·
Los mantenedores suelen responder en 1 día
-
common.Retry: data race on the shared response/err variables when the request context ends mid-attempt (v65.127.0, v65.128.0)Posiblemente ocupada @kmohit00 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
oracle/oci-go-sdk#676 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
SAP/crossplane-provider-btp#1175 ·
Los mantenedores suelen responder en 1 día