Skip to content

Commit

Permalink
Merge pull request #80 from kookmin-sw/jihun
Browse files Browse the repository at this point in the history
remove ram_size
  • Loading branch information
mh3ong authored May 18, 2024
2 parents 9f6a0da + 4dcecc0 commit 0bedf91
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions automation/llama_inference_deploy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"--kubeconfig", kubeconfig
])

def generate_yaml(user_namespace, endpoint_uid, model_s3_url, node_pool_name, ram_size):
def generate_yaml(user_namespace, endpoint_uid, model_s3_url, node_pool_name):
content = f"""---
apiVersion: v1
kind: Namespace
Expand Down Expand Up @@ -106,8 +106,8 @@ def generate_yaml(user_namespace, endpoint_uid, model_s3_url, node_pool_name, ra

return filepath

def apply_yaml(user_namespace, endpoint_uid, model_s3_url, node_pool_name, ram_size):
filename = generate_yaml(user_namespace, endpoint_uid, model_s3_url, node_pool_name, ram_size)
def apply_yaml(user_namespace, endpoint_uid, model_s3_url, node_pool_name):
filename = generate_yaml(user_namespace, endpoint_uid, model_s3_url, node_pool_name)
result = subprocess.run([
kubectl, "apply", "-f", filename, "--kubeconfig", kubeconfig
])
Expand Down Expand Up @@ -142,8 +142,7 @@ def handler(event, context):
if action == "create":
model_s3_url = body['model']['s3_url']
node_pool_name = "nodepool-1"
ram_size = body['model']['max_used_ram']
result = apply_yaml(user_uid, endpoint_uid, model_s3_url, node_pool_name, ram_size)
result = apply_yaml(user_uid, endpoint_uid, model_s3_url, node_pool_name)

cmd = "{} get ingress -A --kubeconfig {} | grep {}".format(kubectl, kubeconfig, endpoint_uid)
time.sleep(10)
Expand Down

0 comments on commit 0bedf91

Please sign in to comment.