From e63414accd4e6ce912d052e29984abbbda715292 Mon Sep 17 00:00:00 2001 From: Bogdan Tintor Date: Tue, 27 Aug 2024 10:00:18 +0200 Subject: [PATCH] CTX-6655: Simplify if condition and explain it. --- coretex/cli/modules/node.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/coretex/cli/modules/node.py b/coretex/cli/modules/node.py index 87138e83..9b507bd4 100644 --- a/coretex/cli/modules/node.py +++ b/coretex/cli/modules/node.py @@ -390,7 +390,11 @@ def configureNode(advanced: bool) -> NodeConfiguration: else: nodeConfig.image = "coretexai/coretex-node" - if isGPUAvailable() and (currentOS != "linux" or not docker.isDockerDesktop()): + # NOTE: If node OS is linux and Docker Desktop is being used CLI won't prompt for GPU access + # Reason is that we cannot solve the NVIDIA bug without additionals changes to daemon.json file + # which doesn't exist when using Docker Desktop + + if isGPUAvailable() and not (docker.isDockerDesktop() and currentOS != "windows"): nodeConfig.allowGpu = ui.clickPrompt("Do you want to allow the Node to access your GPU? (Y/n)", type = bool, default = True) else: nodeConfig.allowGpu = False