Skip to content

[k8s] Fix GPU detection when running with sky local up --ips #4561

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

romilbhardwaj
Copy link
Collaborator

When sky local up --ips is run on a remote cluster with CPUs only, our script incorrectly detects GPUs and gets stuck at installing nvidia GPU operator. This is because the check_gpu function is silently failing but the output is still being interpreted as truthy. This PR fixes it by explicitly returning true/false values.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • sky local up --ips ips.txt --ssh-user ubuntu --ssh-key-path ~/.sky/generated/ssh-keys/aws.key on a CPU only cluster.

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @romilbhardwaj !

@romilbhardwaj romilbhardwaj merged commit 065f467 into master Jan 15, 2025
18 checks passed
@romilbhardwaj romilbhardwaj deleted the localup-fix-gpu-detection branch January 15, 2025 21:19
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants