diff --git a/README.md b/README.md index 03c5ccdc..18b35226 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ EMBEDDING_MODEL=ollama/all-minilm:l6-v2 KUBEFLOW_LLAMA_STACK_URL= KUBEFLOW_PIPELINES_ENDPOINT= KUBEFLOW_NAMESPACE= -KUBEFLOW_BASE_IMAGE=quay.io/diegosquayorg/my-ragas-provider-image:latest +KUBEFLOW_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312:latest KUBEFLOW_PIPELINES_TOKEN= KUBEFLOW_RESULTS_S3_PREFIX=s3://my-bucket/ragas-results KUBEFLOW_S3_CREDENTIALS_SECRET_NAME= @@ -80,7 +80,7 @@ Where: - `KUBEFLOW_PIPELINES_ENDPOINT`: You can get this via `kubectl get routes -A | grep -i pipeline` on your Kubernetes cluster. - `KUBEFLOW_NAMESPACE`: The name of the data science project where the Kubeflow Pipelines server is running. - `KUBEFLOW_PIPELINES_TOKEN`: Kubeflow Pipelines token with access to submit pipelines. If not provided, the token will be read from the local kubeconfig file. -- `KUBEFLOW_BASE_IMAGE`: The image used to run the Ragas evaluation in the remote provider. See `Containerfile` for details. There is a public version of this image at `quay.io/diegosquayorg/my-ragas-provider-image:latest`. +- `KUBEFLOW_BASE_IMAGE`: The base container image used to run the Ragas evaluation in the remote provider. Defaults to `registry.access.redhat.com/ubi9/python-312:latest`. The KFP components will automatically install `llama-stack-provider-ragas[remote]` and its dependencies on top of this base image. You can override this by setting the environment variable to use a custom image. - `KUBEFLOW_RESULTS_S3_PREFIX`: S3 location (bucket and prefix folder) where evaluation results will be stored, e.g., `s3://my-bucket/ragas-results`. - `KUBEFLOW_S3_CREDENTIALS_SECRET_NAME`: Name of the Kubernetes secret containing AWS credentials with write access to the S3 bucket. Create with: ```bash diff --git a/docs/modules/ROOT/pages/remote-provider.adoc b/docs/modules/ROOT/pages/remote-provider.adoc index 136f0538..d566d631 100644 --- a/docs/modules/ROOT/pages/remote-provider.adoc +++ b/docs/modules/ROOT/pages/remote-provider.adoc @@ -140,8 +140,8 @@ KUBEFLOW_PIPELINES_ENDPOINT= # Kubernetes namespace for Kubeflow KUBEFLOW_NAMESPACE= -# Container image for remote execution -KUBEFLOW_BASE_IMAGE=quay.io/diegosquayorg/my-ragas-provider-image:latest +# Container base image for remote execution +KUBEFLOW_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312:latest # Authentication token for Kubeflow Pipelines KUBEFLOW_PIPELINES_TOKEN= @@ -171,7 +171,7 @@ kubectl get routes -A | grep -i pipeline The name of the data science project where the Kubeflow Pipelines server is running. `KUBEFLOW_BASE_IMAGE`:: -The container image used to run the Ragas evaluation in the remote provider. See the `Containerfile` in the repository root for details on building a custom image. +The base container image used to run the Ragas evaluation in the remote provider. Defaults to `registry.access.redhat.com/ubi9/python-312:latest`. The Kubeflow Pipeline components will automatically install `llama-stack-provider-ragas[remote]` and its dependencies on top of this base image at runtime. This provides flexibility to use different base images for different environments while ensuring the latest package versions are always used. `KUBEFLOW_PIPELINES_TOKEN`:: Kubeflow Pipelines token with access to submit pipelines. If not provided, the token will be read from the local kubeconfig file. This token is used to authenticate with the Kubeflow Pipelines API for pipeline submission and monitoring. diff --git a/src/llama_stack_provider_ragas/constants.py b/src/llama_stack_provider_ragas/constants.py index cf592f75..a7f11e04 100644 --- a/src/llama_stack_provider_ragas/constants.py +++ b/src/llama_stack_provider_ragas/constants.py @@ -29,5 +29,5 @@ # Kubeflow ConfigMap keys and defaults for base image resolution RAGAS_PROVIDER_IMAGE_CONFIGMAP_NAME = "trustyai-service-operator-config" RAGAS_PROVIDER_IMAGE_CONFIGMAP_KEY = "ragas-provider-image" -DEFAULT_RAGAS_PROVIDER_IMAGE = "quay.io/trustyai/llama-stack-provider-ragas:latest" +DEFAULT_RAGAS_PROVIDER_IMAGE = "registry.access.redhat.com/ubi9/python-312:latest" KUBEFLOW_CANDIDATE_NAMESPACES = ["redhat-ods-applications", "opendatahub"] diff --git a/src/llama_stack_provider_ragas/remote/kubeflow/components.py b/src/llama_stack_provider_ragas/remote/kubeflow/components.py index e3121d0e..64805775 100644 --- a/src/llama_stack_provider_ragas/remote/kubeflow/components.py +++ b/src/llama_stack_provider_ragas/remote/kubeflow/components.py @@ -56,7 +56,10 @@ def get_base_image() -> str: return DEFAULT_RAGAS_PROVIDER_IMAGE -@dsl.component(base_image=get_base_image()) +@dsl.component( + base_image=get_base_image(), + packages_to_install=["llama-stack-provider-ragas[remote]"], +) def retrieve_data_from_llama_stack( dataset_id: str, llama_stack_base_url: str, @@ -72,7 +75,10 @@ def retrieve_data_from_llama_stack( df.to_json(output_dataset.path, orient="records", lines=True) -@dsl.component(base_image=get_base_image()) +@dsl.component( + base_image=get_base_image(), + packages_to_install=["llama-stack-provider-ragas[remote]"], +) def run_ragas_evaluation( model: str, sampling_params: dict,