diff --git a/pkg/components/estimator/estimator.go b/pkg/components/estimator/estimator.go index 43326a51..e4e858f0 100644 --- a/pkg/components/estimator/estimator.go +++ b/pkg/components/estimator/estimator.go @@ -28,7 +28,7 @@ import ( const ( // NOTE: update tests/images.yaml when changing this image - StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.11-2" + StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.12" waitForSocketCommand = "until [ -e /tmp/estimator.sock ]; do sleep 1; done && %s" ) diff --git a/pkg/components/modelserver/modelserver.go b/pkg/components/modelserver/modelserver.go index fbfb991d..73b657a7 100644 --- a/pkg/components/modelserver/modelserver.go +++ b/pkg/components/modelserver/modelserver.go @@ -39,7 +39,7 @@ const ( const ( defaultModelServer = "http://%s.%s.svc.cluster.local:%d" - StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.11-2" + StableImage = "quay.io/sustainable_computing_io/kepler_model_server:v0.7.12" waitForModelServerCommand = "until [[ \"$(curl -s -o /dev/null -w %%{http_code} %s/best-models)\" -eq 200 ]]; do sleep 1; done" ) @@ -71,7 +71,7 @@ func NewDeployment(deployName string, ms *v1alpha1.InternalModelServerSpec, name volumes := []corev1.Volume{ storage, k8s.VolumeFromConfigMap("cfm", configMapName), - k8s.VolumeFromEmptyDir("resource"), + k8s.VolumeFromEmptyDir("data"), } mounts := []corev1.VolumeMount{{ @@ -82,8 +82,8 @@ func NewDeployment(deployName string, ms *v1alpha1.InternalModelServerSpec, name Name: "mnt", MountPath: "/mnt", }, { - Name: "resource", - MountPath: "/usr/local/lib/python3.10/site-packages/resource", + Name: "data", + MountPath: "/data", }} port := ms.Port @@ -179,7 +179,8 @@ func NewConfigMap(deployName string, d components.Detail, ms *v1alpha1.InternalM } } msConfig := k8s.StringMap{ - "MODEL_PATH": defaultIfEmpty(ms.Path, "/mnt/models"), + "MODEL_PATH": defaultIfEmpty(ms.Path, "/mnt/models"), + "RESOURCE_DIR": "/data/resource", } msConfig = msConfig.AddIfNotEmpty("MODEL_SERVER_REQ_PATH", ms.RequestPath) msConfig = msConfig.AddIfNotEmpty("MODEL_SERVER_MODEL_LIST_PATH", ms.ListPath) diff --git a/pkg/components/modelserver/modelserver_test.go b/pkg/components/modelserver/modelserver_test.go index 7cb3c0ce..8c886041 100644 --- a/pkg/components/modelserver/modelserver_test.go +++ b/pkg/components/modelserver/modelserver_test.go @@ -35,7 +35,8 @@ func TestConfigMap(t *testing.T) { { spec: &v1alpha1.InternalModelServerSpec{}, data: map[string]string{ - "MODEL_PATH": "/mnt/models", + "MODEL_PATH": "/mnt/models", + "RESOURCE_DIR": "/data/resource", }, scenario: "default case", }, @@ -54,6 +55,7 @@ func TestConfigMap(t *testing.T) { "MODEL_SERVER_MODEL_LIST_PATH": "fake-model-list-path", "INITIAL_PIPELINE_URL": "fake-pipeline", "ERROR_KEY": "fake-error-key", + "RESOURCE_DIR": "/data/resource", }, scenario: "user defined server-api config", }, diff --git a/tests/images.yaml b/tests/images.yaml index ab965538..8a5bffba 100644 --- a/tests/images.yaml +++ b/tests/images.yaml @@ -1,3 +1,3 @@ images: - component: 'model-server' - image: 'quay.io/sustainable_computing_io/kepler_model_server:v0.7.11-2' + image: 'quay.io/sustainable_computing_io/kepler_model_server:v0.7.12'