From 5baf25451a15541030e507816cd369f326231712 Mon Sep 17 00:00:00 2001 From: Zoey Zhang Date: Tue, 17 Jun 2025 16:25:20 -0400 Subject: [PATCH] adding fix for lowercase and name length k8s requirements Signed-off-by: Zoey Zhang --- nemo_run/core/execution/lepton.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nemo_run/core/execution/lepton.py b/nemo_run/core/execution/lepton.py index d5e8511e..f3cd2c92 100644 --- a/nemo_run/core/execution/lepton.py +++ b/nemo_run/core/execution/lepton.py @@ -240,7 +240,10 @@ def create_lepton_job(self, name: str): def launch(self, name: str, cmd: list[str]) -> tuple[str, str]: self._validate_mounts() - name = name.replace("_", "-").replace(".", "-") # to meet K8s requirements + name = name.replace("_", "-").replace(".", "-").lower() # to meet K8s requirements + if len(name) > 35: + logger.warning("length of name exceeds 35 characters. Shortening...") + name = name[:34] launch_script = f""" wget -O init.sh https://raw.githubusercontent.com/leptonai/scripts/main/lepton_env_to_pytorch.sh chmod +x init.sh