Skip to content
New issue

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

By clicking “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? Sign in to your account

[k8s] Use default runtime on k3s for CPU tasks #3918

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sky/provision/kubernetes/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,9 @@ def _create_pods(region: str, cluster_name_on_cloud: str,
'override runtimeClassName in ~/.sky/config.yaml. '
'For more details, refer to https://skypilot.readthedocs.io/en/latest/reference/config.html') # pylint: disable=line-too-long

if nvidia_runtime_exists:
needs_gpus = (pod_spec['spec']['containers'][0].get('resources', {}).get(
'limits', {}).get('nvidia.com/gpu', 0) > 0)
if nvidia_runtime_exists and needs_gpus:
pod_spec['spec']['runtimeClassName'] = 'nvidia'

created_pods = {}
Expand Down
Loading