From b07ced0cef6b2b923e093091d10f54ee46e54b14 Mon Sep 17 00:00:00 2001 From: Akihiko Kuroda Date: Wed, 8 Nov 2023 16:10:38 -0500 Subject: [PATCH] fix merge error --- .../charts/gateway/templates/rayclustertemplate.yaml | 4 ++-- gateway/api/ray.py | 2 ++ gateway/api/serializers.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/quantum-serverless/charts/gateway/templates/rayclustertemplate.yaml b/charts/quantum-serverless/charts/gateway/templates/rayclustertemplate.yaml index bc7bc10c7..445dbffce 100644 --- a/charts/quantum-serverless/charts/gateway/templates/rayclustertemplate.yaml +++ b/charts/quantum-serverless/charts/gateway/templates/rayclustertemplate.yaml @@ -69,7 +69,7 @@ data: {{- end }} affinity: containers: - - image: {{ .Values.application.ray.nodeImage | quote }} + - image: {{`{{ node_image }}`| quote }} imagePullPolicy: IfNotPresent name: ray-head ports: @@ -300,7 +300,7 @@ data: - name: OT_ENABLED value: {{ .Values.application.ray.openTelemetryCollector.enabled | quote }} {{- end }} - image: {{ .Values.application.ray.nodeImage | quote}} + image: {{`{{ node_image }}`| quote}} imagePullPolicy: IfNotPresent name: ray-worker resources: diff --git a/gateway/api/ray.py b/gateway/api/ray.py index 3ffb36c60..f1aa897b7 100644 --- a/gateway/api/ray.py +++ b/gateway/api/ray.py @@ -187,6 +187,8 @@ def create_ray_cluster( job_config.max_workers = settings.RAY_CLUSTER_WORKER_MAX_REPLICAS if not job_config.auto_scaling: job_config.auto_scaling = settings.RAY_CLUSTER_WORKER_AUTO_SCALING + if not job_config.python_version: + job_config.python_version = settings.RAY_PYTHON_VERSION py_version = job_config.python_version node_image = ( diff --git a/gateway/api/serializers.py b/gateway/api/serializers.py index 8cd57935d..14f03a58b 100644 --- a/gateway/api/serializers.py +++ b/gateway/api/serializers.py @@ -23,6 +23,7 @@ class Meta: "min_workers", "max_workers", "auto_scaling", + "python_version", ] workers = serializers.IntegerField( @@ -43,6 +44,7 @@ class Meta: auto_scaling = serializers.BooleanField( default=False, required=False, allow_null=True ) + python_version = serializers.CharField(required=False, allow_null=True) class ProgramSerializer(serializers.ModelSerializer):