Skip to content

Commit 7bc708b

Browse files
authored
Merge pull request #49 from dmaniloff/use-stock-python-image
Use stock python image for KFP & add package installation to components.
2 parents 1c32efe + 6a07eb0 commit 7bc708b

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ EMBEDDING_MODEL=ollama/all-minilm:l6-v2
6969
KUBEFLOW_LLAMA_STACK_URL=<your-llama-stack-url>
7070
KUBEFLOW_PIPELINES_ENDPOINT=<your-kfp-endpoint>
7171
KUBEFLOW_NAMESPACE=<your-namespace>
72-
KUBEFLOW_BASE_IMAGE=quay.io/diegosquayorg/my-ragas-provider-image:latest
72+
KUBEFLOW_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312:latest
7373
KUBEFLOW_PIPELINES_TOKEN=<your-pipelines-token>
7474
KUBEFLOW_RESULTS_S3_PREFIX=s3://my-bucket/ragas-results
7575
KUBEFLOW_S3_CREDENTIALS_SECRET_NAME=<secret-name>
@@ -80,7 +80,7 @@ Where:
8080
- `KUBEFLOW_PIPELINES_ENDPOINT`: You can get this via `kubectl get routes -A | grep -i pipeline` on your Kubernetes cluster.
8181
- `KUBEFLOW_NAMESPACE`: The name of the data science project where the Kubeflow Pipelines server is running.
8282
- `KUBEFLOW_PIPELINES_TOKEN`: Kubeflow Pipelines token with access to submit pipelines. If not provided, the token will be read from the local kubeconfig file.
83-
- `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`.
83+
- `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.
8484
- `KUBEFLOW_RESULTS_S3_PREFIX`: S3 location (bucket and prefix folder) where evaluation results will be stored, e.g., `s3://my-bucket/ragas-results`.
8585
- `KUBEFLOW_S3_CREDENTIALS_SECRET_NAME`: Name of the Kubernetes secret containing AWS credentials with write access to the S3 bucket. Create with:
8686
```bash

docs/modules/ROOT/pages/remote-provider.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ KUBEFLOW_PIPELINES_ENDPOINT=<your-kfp-endpoint>
140140
# Kubernetes namespace for Kubeflow
141141
KUBEFLOW_NAMESPACE=<your-namespace>
142142
143-
# Container image for remote execution
144-
KUBEFLOW_BASE_IMAGE=quay.io/diegosquayorg/my-ragas-provider-image:latest
143+
# Container base image for remote execution
144+
KUBEFLOW_BASE_IMAGE=registry.access.redhat.com/ubi9/python-312:latest
145145
146146
# Authentication token for Kubeflow Pipelines
147147
KUBEFLOW_PIPELINES_TOKEN=<your-pipelines-token>
@@ -171,7 +171,7 @@ kubectl get routes -A | grep -i pipeline
171171
The name of the data science project where the Kubeflow Pipelines server is running.
172172

173173
`KUBEFLOW_BASE_IMAGE`::
174-
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.
174+
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.
175175

176176
`KUBEFLOW_PIPELINES_TOKEN`::
177177
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.

src/llama_stack_provider_ragas/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
# Kubeflow ConfigMap keys and defaults for base image resolution
3030
RAGAS_PROVIDER_IMAGE_CONFIGMAP_NAME = "trustyai-service-operator-config"
3131
RAGAS_PROVIDER_IMAGE_CONFIGMAP_KEY = "ragas-provider-image"
32-
DEFAULT_RAGAS_PROVIDER_IMAGE = "quay.io/trustyai/llama-stack-provider-ragas:latest"
32+
DEFAULT_RAGAS_PROVIDER_IMAGE = "registry.access.redhat.com/ubi9/python-312:latest"
3333
KUBEFLOW_CANDIDATE_NAMESPACES = ["redhat-ods-applications", "opendatahub"]

src/llama_stack_provider_ragas/remote/kubeflow/components.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ def get_base_image() -> str:
5656
return DEFAULT_RAGAS_PROVIDER_IMAGE
5757

5858

59-
@dsl.component(base_image=get_base_image())
59+
@dsl.component(
60+
base_image=get_base_image(),
61+
packages_to_install=["llama-stack-provider-ragas[remote]"],
62+
)
6063
def retrieve_data_from_llama_stack(
6164
dataset_id: str,
6265
llama_stack_base_url: str,
@@ -72,7 +75,10 @@ def retrieve_data_from_llama_stack(
7275
df.to_json(output_dataset.path, orient="records", lines=True)
7376

7477

75-
@dsl.component(base_image=get_base_image())
78+
@dsl.component(
79+
base_image=get_base_image(),
80+
packages_to_install=["llama-stack-provider-ragas[remote]"],
81+
)
7682
def run_ragas_evaluation(
7783
model: str,
7884
sampling_params: dict,

0 commit comments

Comments
 (0)