Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
romilbhardwaj committed Nov 19, 2023
1 parent c855670 commit 1bed6ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/reference/kubernetes/kubernetes-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Setting up GPU support
~~~~~~~~~~~~~~~~~~~~~~
If your Kubernetes cluster has Nvidia GPUs, ensure that:

1. The Nvidia device plugin installed (i.e., ``nvidia.com/gpu`` resource is available on each node).
1. The Nvidia device plugin is installed (i.e., ``nvidia.com/gpu`` resource is available on each node).
2. Each node in your cluster is labelled with the GPU type. This labelling can be done by adding a label of the format ``skypilot.co/accelerators: <gpu_name>``, where the ``<gpu_name>`` is the lowercase name of the GPU. For example, a node with V100 GPUs must have a label :code:`skypilot.co/accelerators: v100`.

We provide a convenience script that automatically detects GPU types and labels each node. You can run it with:
Expand Down
4 changes: 2 additions & 2 deletions sky/utils/kubernetes_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def get_accelerator_from_label_value(cls, value: str) -> str:
def validate_label_value(cls, value: str) -> Tuple[bool, str]:
"""Values must be all lowercase for the SkyPilot formatter."""
is_valid = value == value.lower()
return is_valid, (f'Label value "{value}" must be lowercase if using '
return is_valid, (f'Label value {value!r} must be lowercase if using '
f'the {cls.get_label_key()} label.'
if not is_valid else '')

Expand Down Expand Up @@ -375,7 +375,7 @@ def get_gpu_label_key_value(acc_type: str, check_mode=False) -> Tuple[str, str]:
value)
if not is_valid:
raise exceptions.ResourcesUnavailableError(
f'Node {node_name} in Kubernetes cluster has '
f'Node {node_name!r} in Kubernetes cluster has '
f'invalid GPU label: {label}={value}. {reason}')
if check_mode:
# If check mode is enabled and we reached so far, we can
Expand Down

0 comments on commit 1bed6ee

Please sign in to comment.