Skip to content

Commit d188fca

Browse files
committed
add back context in helptext
1 parent a0df0c3 commit d188fca

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

sky/utils/kubernetes/gpu_labeler.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,16 @@ def label(context: Optional[str] = None):
124124
batch_v1.create_namespaced_job(namespace, job_manifest)
125125
print(f'Created GPU labeler job for node {node_name}')
126126

127-
print('GPU labeling started - this may take 10 min or more to complete.'
128-
'\nTo check the status of GPU labeling jobs, run '
129-
'`kubectl get jobs -n kube-system -l job=sky-gpu-labeler`'
130-
'\nYou can check if nodes have been labeled by running '
131-
'`kubectl describe nodes` and looking for labels of the format '
132-
'`skypilot.co/accelerator: <gpu_name>`. ')
127+
context_str = f' --context {context}' if context else ''
128+
print(
129+
f'GPU labeling started - this may take 10 min or more to complete.'
130+
'\nTo check the status of GPU labeling jobs, run '
131+
f'`kubectl get jobs -n kube-system '
132+
f'-l job=sky-gpu-labeler{context_str}`'
133+
'\nYou can check if nodes have been labeled by running '
134+
f'`kubectl describe nodes{context_str}` '
135+
'and looking for labels of the format '
136+
'`skypilot.co/accelerator: <gpu_name>`. ')
133137

134138

135139
def main():

0 commit comments

Comments
 (0)