From 116d7e73fb0ef474ce3a370fbb90e206ffc0df62 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Fri, 19 May 2023 22:48:56 +0300 Subject: [PATCH] pth-facebookresearch-sam-vit-h: add NVIDIA environment variables to the GPU image (#6171) Without these variables, the container cannot actually use CUDA. At least that was my experience on AWS; it's possible that in other configurations the defaults are different. See . --- .../pytorch/facebookresearch/sam/nuclio/function-gpu.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/serverless/pytorch/facebookresearch/sam/nuclio/function-gpu.yaml b/serverless/pytorch/facebookresearch/sam/nuclio/function-gpu.yaml index d10e7630977d..437dc263113f 100644 --- a/serverless/pytorch/facebookresearch/sam/nuclio/function-gpu.yaml +++ b/serverless/pytorch/facebookresearch/sam/nuclio/function-gpu.yaml @@ -31,6 +31,11 @@ spec: directives: preCopy: + # set NVIDIA container runtime settings + - kind: ENV + value: NVIDIA_VISIBLE_DEVICES=all + - kind: ENV + value: NVIDIA_DRIVER_CAPABILITIES=compute,utility # disable interactive frontend - kind: ENV value: DEBIAN_FRONTEND=noninteractive