Skip to content

Commit 6399fd9

Browse files
ayushr2gvisor-bot
authored andcommitted
gpu: Undeprecate --nvproxy-docker.
This flag is still used to determine whether the NVIDIA prestart hook is present or not. This may still have users. Keep it for backward compatibility. Although remove its usages from tests and mark it "legacy" to encourage users to directly use `docker run --gpus`. PiperOrigin-RevId: 861263124
1 parent 38123b5 commit 6399fd9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ gpu-smoke-images: load-gpu_cuda-tests load-gpu_cuda-tests-12-8
296296

297297
gpu-smoke-tests: gpu-smoke-images $(RUNTIME_BIN)
298298
@$(call sudo,test/gpu:smoke_test,--runtime=runc -test.v $(ARGS))
299-
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-docker=true)
299+
@$(call install_runtime,$(RUNTIME),--nvproxy=true)
300300
@$(call sudo,test/gpu:smoke_test,--runtime=$(RUNTIME) -test.v $(ARGS))
301301
.PHONY: gpu-smoke-tests
302302

@@ -317,13 +317,13 @@ l4-gpu-images: load-gpu_sglang load-gpu_sglang_client load-gpu_triton load-gpu_t
317317
.PHONY: l4-gpu-images
318318

319319
l4-gpu-tests: l4-gpu-images $(RUNTIME_BIN)
320-
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-docker=true --nvproxy-allowed-driver-capabilities=all)
320+
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-allowed-driver-capabilities=all)
321321
@$(call sudo,test/gpu:sglang_test,--runtime=$(RUNTIME) -test.v $(ARGS))
322322
@$(call sudo,test/gpu:triton_test,--runtime=$(RUNTIME) -test.v $(ARGS))
323323
.PHONY: l4-gpu-tests
324324

325325
gpu-all-tests: gpu-images gpu-smoke-tests $(RUNTIME_BIN)
326-
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-docker=true --nvproxy-allowed-driver-capabilities=all)
326+
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-allowed-driver-capabilities=all)
327327
@$(call sudo,test/gpu:pytorch_test,--runtime=$(RUNTIME) -test.v $(ARGS))
328328
@$(call sudo,test/gpu:textgen_test,--runtime=$(RUNTIME) -test.v $(ARGS))
329329
@$(call sudo,test/gpu:imagegen_test,--runtime=$(RUNTIME) -test.v $(ARGS))
@@ -348,12 +348,12 @@ cos-gpu-all-tests: gpu-images cos-gpu-smoke-tests $(RUNTIME_BIN)
348348
.PHONY: cos-gpu-all-tests
349349

350350
cuda-tests: load-basic_alpine load-gpu_cuda-tests $(RUNTIME_BIN)
351-
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-docker=true --nvproxy-allowed-driver-capabilities=all)
351+
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-allowed-driver-capabilities=all)
352352
@$(call sudo,test/gpu:cuda_test,--runtime=$(RUNTIME) -test.v $(ARGS))
353353
.PHONY: cuda-tests
354354

355355
cuda-12-8-tests: load-basic_alpine load-gpu_cuda-tests-12-8 $(RUNTIME_BIN)
356-
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-docker=true --nvproxy-allowed-driver-capabilities=all)
356+
@$(call install_runtime,$(RUNTIME),--nvproxy=true --nvproxy-allowed-driver-capabilities=all)
357357
@$(call sudo,test/gpu:cuda_12_8_test,--runtime=$(RUNTIME) -test.v $(ARGS))
358358
.PHONY: cuda-tests
359359

runsc/config/flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ func RegisterFlags(flagSet *flag.FlagSet) {
156156

157157
// Flags that control sandbox runtime behavior: accelerator related.
158158
flagSet.Bool("nvproxy", false, "EXPERIMENTAL: enable support for Nvidia GPUs")
159+
flagSet.Bool("nvproxy-docker", false, "LEGACY: Injects nvidia-container-runtime-hook as a prestart hook. Try to use nvidia-container-runtime or `docker run --gpus` instead. Or manually add nvidia-container-runtime-hook as a prestart hook and set up NVIDIA_VISIBLE_DEVICES container environment variable.")
159160
flagSet.String("nvproxy-driver-version", "", "NVIDIA driver ABI version to use. If empty, autodetect installed driver version. The special value 'latest' may also be used to use the latest ABI.")
160161
flagSet.String("nvproxy-allowed-driver-capabilities", "utility,compute", "Comma separated list of NVIDIA driver capabilities that are allowed to be requested by the container. If 'all' is specified here, it is resolved to all driver capabilities supported in nvproxy. If 'all' is requested by the container, it is resolved to this list.")
161162
flagSet.Bool("tpuproxy", false, "EXPERIMENTAL: enable support for TPU device passthrough.")

runsc/config/flags_graveyard.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,4 @@ func RegisterDeprecatedFlags(flagSet *flag.FlagSet) {
4949
deprecatedBool(flagSet, "lisafs", true, "DEPRECATED: this flag has no effect.", time.Date(2027, time.January, 1, 0, 0, 0, 0, time.UTC))
5050
deprecatedBool(flagSet, "cgroupfs", false, "DEPRECATED: this flag has no effect.", time.Date(2027, time.January, 1, 0, 0, 0, 0, time.UTC))
5151
deprecatedBool(flagSet, "fsgofer-host-uds", false, "DEPRECATED: use host-uds=all", time.Date(2027, time.January, 1, 0, 0, 0, 0, time.UTC))
52-
deprecatedBool(flagSet, "nvproxy-docker", false, "DEPRECATED: use nvidia-container-runtime or `docker run --gpus` directly. Or manually add nvidia-container-runtime-hook as a prestart hook and set up NVIDIA_VISIBLE_DEVICES container environment variable.", time.Date(2027, time.January, 1, 0, 0, 0, 0, time.UTC))
5352
}

0 commit comments

Comments
 (0)