Skip to content

Commit

Permalink
[k8s] Add resource limits only if they exist (#4440)
Browse files Browse the repository at this point in the history
Add limits only if they exist
  • Loading branch information
romilbhardwaj authored Dec 5, 2024
1 parent 3009204 commit 6e50832
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sky/templates/kubernetes-ray.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ available_node_types:
# https://gitlab.com/arm-research/smarter/smarter-device-manager
smarter-devices/fuse: "1"
{% endif %}
{% if k8s_resource_key is not none or k8s_fuse_device_required %}
limits:
# Limits need to be defined for GPU/TPU requests
{% if k8s_resource_key is not none %}
Expand All @@ -568,7 +569,8 @@ available_node_types:
{% if k8s_fuse_device_required %}
smarter-devices/fuse: "1"
{% endif %}

{% endif %}

setup_commands:
# Disable `unattended-upgrades` to prevent apt-get from hanging. It should be called at the beginning before the process started to avoid being blocked. (This is a temporary fix.)
# Create ~/.ssh/config file in case the file does not exist in the image.
Expand Down

0 comments on commit 6e50832

Please sign in to comment.