Skip to content

Commit

Permalink
CTX-6655: Simplify if condition and explain it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Tintor committed Aug 27, 2024
1 parent 97533bb commit e63414a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion coretex/cli/modules/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e63414a

Please sign in to comment.