-
Notifications
You must be signed in to change notification settings - Fork 49
LCORE-334: Lightspeed core needs to fully support RHOAI LLM provider (prow) #747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Lightspeed Core Service (LCS) | ||
| service: | ||
| host: 0.0.0.0 | ||
| port: 8080 | ||
| auth_enabled: false | ||
| workers: 1 | ||
| color_log: true | ||
| access_log: true | ||
| llama_stack: | ||
| # Uses a remote llama-stack service | ||
| # The instance would have already been started with a llama-stack-run.yaml file | ||
| use_as_library_client: false | ||
| # Alternative for "as library use" | ||
| # use_as_library_client: true | ||
| # library_client_config_path: <path-to-llama-stack-run.yaml-file> | ||
| url: http://${env.E2E_LLAMA_HOSTNAME}:8321 | ||
| api_key: xyzzy | ||
| user_data_collection: | ||
| feedback_enabled: true | ||
| feedback_storage: "/tmp/data/feedback" | ||
| transcripts_enabled: true | ||
| transcripts_storage: "/tmp/data/transcripts" | ||
|
|
||
| authentication: | ||
| module: "noop" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| version: '2' | ||
| image_name: minimal-viable-llama-stack-configuration | ||
|
|
||
| apis: | ||
| - agents | ||
| - datasetio | ||
| - eval | ||
| - inference | ||
| - post_training | ||
| - safety | ||
| - scoring | ||
| - telemetry | ||
| - tool_runtime | ||
| - vector_io | ||
| benchmarks: [] | ||
| container_image: null | ||
| datasets: [] | ||
| external_providers_dir: null | ||
| inference_store: | ||
| db_path: .llama/distributions/ollama/inference_store.db | ||
| type: sqlite | ||
| logging: null | ||
| metadata_store: | ||
| db_path: .llama/distributions/ollama/registry.db | ||
| namespace: null | ||
| type: sqlite | ||
| providers: | ||
| agents: | ||
| - config: | ||
| persistence_store: | ||
| db_path: .llama/distributions/ollama/agents_store.db | ||
| namespace: null | ||
| type: sqlite | ||
| responses_store: | ||
| db_path: .llama/distributions/ollama/responses_store.db | ||
| type: sqlite | ||
| provider_id: meta-reference | ||
| provider_type: inline::meta-reference | ||
| datasetio: | ||
| - config: | ||
| kvstore: | ||
| db_path: .llama/distributions/ollama/huggingface_datasetio.db | ||
| namespace: null | ||
| type: sqlite | ||
| provider_id: huggingface | ||
| provider_type: remote::huggingface | ||
| - config: | ||
| kvstore: | ||
| db_path: .llama/distributions/ollama/localfs_datasetio.db | ||
| namespace: null | ||
| type: sqlite | ||
| provider_id: localfs | ||
| provider_type: inline::localfs | ||
| eval: | ||
| - config: | ||
| kvstore: | ||
| db_path: .llama/distributions/ollama/meta_reference_eval.db | ||
| namespace: null | ||
| type: sqlite | ||
| provider_id: meta-reference | ||
| provider_type: inline::meta-reference | ||
| inference: | ||
| - provider_id: vllm | ||
| provider_type: remote::vllm | ||
| config: | ||
| url: ${env.KSVC_URL}/v1/ | ||
| api_token: ${env.VLLM_API_KEY} | ||
| tls_verify: false | ||
| max_tokens: 1024 | ||
| post_training: | ||
| - config: | ||
| checkpoint_format: huggingface | ||
| device: cpu | ||
| distributed_backend: null | ||
| dpo_output_dir: "." | ||
| provider_id: huggingface | ||
| provider_type: inline::huggingface-gpu | ||
| safety: | ||
| - config: | ||
| excluded_categories: [] | ||
| provider_id: llama-guard | ||
| provider_type: inline::llama-guard | ||
| scoring: | ||
| - config: {} | ||
| provider_id: basic | ||
| provider_type: inline::basic | ||
| - config: {} | ||
| provider_id: llm-as-judge | ||
| provider_type: inline::llm-as-judge | ||
| - config: | ||
| openai_api_key: '********' | ||
| provider_id: braintrust | ||
| provider_type: inline::braintrust | ||
| telemetry: | ||
| - config: | ||
| service_name: 'lightspeed-stack-telemetry' | ||
| sinks: sqlite | ||
| sqlite_db_path: .llama/distributions/ollama/trace_store.db | ||
| provider_id: meta-reference | ||
| provider_type: inline::meta-reference | ||
| tool_runtime: [] | ||
| vector_io: [] | ||
| scoring_fns: [] | ||
| server: | ||
| auth: null | ||
| host: null | ||
| port: 8321 | ||
| quota: null | ||
| tls_cafile: null | ||
| tls_certfile: null | ||
| tls_keyfile: null | ||
| shields: [] | ||
| vector_dbs: [] | ||
|
|
||
| models: | ||
| - model_id: meta-llama/Llama-3.2-1B-Instruct | ||
| provider_id: vllm | ||
| model_type: llm | ||
| provider_model_id: null | ||
|
|
25 changes: 25 additions & 0 deletions
25
tests/e2e-prow/rhoai/manifests/lightspeed/lightspeed-stack.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: lightspeed-stack-service | ||
| namespace: e2e-rhoai-dsc | ||
| spec: | ||
| containers: | ||
| - name: lightspeed-stack-container | ||
| env: | ||
| - name: E2E_LLAMA_HOSTNAME | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: llama-stack-ip-secret | ||
| key: key | ||
| image: quay.io/lightspeed-core/lightspeed-stack:dev-latest | ||
| ports: | ||
| - containerPort: 8080 | ||
| volumeMounts: | ||
| - name: config | ||
| mountPath: /app-root/lightspeed-stack.yaml | ||
| subPath: lightspeed-stack.yaml | ||
| volumes: | ||
| - name: config | ||
| configMap: | ||
| name: lightspeed-stack-config |
34 changes: 34 additions & 0 deletions
34
tests/e2e-prow/rhoai/manifests/lightspeed/llama-stack.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: llama-stack-service | ||
| namespace: e2e-rhoai-dsc | ||
| spec: | ||
| containers: | ||
| - name: llama-stack-container | ||
| env: | ||
| - name: KSVC_URL | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: api-url-secret | ||
| key: key | ||
| - name: VLLM_API_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: vllm-api-key-secret | ||
| key: key | ||
| image: quay.io/opendatahub/llama-stack:rhoai-v2.25-latest | ||
| ports: | ||
| - containerPort: 8321 | ||
| volumeMounts: | ||
| - name: app-root | ||
| mountPath: /opt/app-root/src/.llama | ||
| - name: config | ||
| mountPath: /opt/app-root/run.yaml | ||
| subPath: run.yaml | ||
| volumes: | ||
| - name: app-root | ||
| emptyDir: {} | ||
| - name: config | ||
| configMap: | ||
| name: llama-stack-config | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| apiVersion: datasciencecluster.opendatahub.io/v1 | ||
| kind: DataScienceCluster | ||
| metadata: | ||
| name: default-dsc | ||
| namespace: e2e-rhoai-dsc | ||
| spec: | ||
| serviceMesh: | ||
| managementState: Managed | ||
| components: | ||
| kserve: | ||
| managementState: Managed | ||
| workbenches: | ||
| managementState: Removed | ||
| dashboard: | ||
| managementState: Removed | ||
| dataSciencePipelines: | ||
| managementState: Removed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: operators.coreos.com/v1 | ||
| kind: OperatorGroup | ||
| metadata: | ||
| name: global-operators | ||
| namespace: openshift-operators | ||
| spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Service Mesh Operator Subscription | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: servicemeshoperator | ||
| namespace: openshift-operators | ||
| spec: | ||
| channel: "stable" | ||
| name: "servicemeshoperator" | ||
| source: "redhat-operators" | ||
| sourceNamespace: "openshift-marketplace" | ||
| --- | ||
| # Serverless Operator Subscription | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: serverless-operator | ||
| namespace: openshift-operators | ||
| spec: | ||
| channel: "stable" | ||
| name: "serverless-operator" | ||
| source: "redhat-operators" | ||
| sourceNamespace: "openshift-marketplace" | ||
| --- | ||
| # RHODS Operator Subscription | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: rhods-operator | ||
| namespace: openshift-operators | ||
| spec: | ||
| channel: stable | ||
| name: rhods-operator | ||
| source: redhat-operators | ||
| sourceNamespace: openshift-marketplace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: test-pod | ||
| namespace: e2e-rhoai-dsc | ||
| spec: | ||
| containers: | ||
| - name: test-container | ||
| env: | ||
| - name: E2E_LSC_HOSTNAME | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: lcs-ip-secret | ||
| key: key | ||
| - name: E2E_LLAMA_HOSTNAME | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: llama-stack-ip-secret | ||
| key: key | ||
| image: registry.access.redhat.com/ubi9/python-312 | ||
| command: ["/bin/sh", "/scripts/run-tests.sh"] | ||
| volumeMounts: | ||
| - name: script-volume | ||
| mountPath: /scripts | ||
| volumes: | ||
| - name: script-volume | ||
| configMap: | ||
| name: test-script-cm | ||
| defaultMode: 0755 # Make the script executable | ||
| restartPolicy: Never |
13 changes: 13 additions & 0 deletions
13
tests/e2e-prow/rhoai/manifests/vllm/inference-service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apiVersion: serving.kserve.io/v1beta1 | ||
| kind: InferenceService | ||
| metadata: | ||
| name: vllm-model | ||
| namespace: e2e-rhoai-dsc | ||
| spec: | ||
| predictor: | ||
| model: | ||
| modelFormat: | ||
| name: pytorch | ||
| runtime: vllm | ||
| storage: | ||
| key: localModel |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add security hardening: securityContext and resource limits.
This Pod lacks security controls and resource management like other manifests in the PR:
securityContext— container runs as rootrequests/limits— unbounded resource usageApply this diff to add hardening:
📝 Committable suggestion
🧰 Tools
🪛 Checkov (3.2.334)
[medium] 1-34: Containers should not run with allowPrivilegeEscalation
(CKV_K8S_20)
[medium] 1-34: Minimize the admission of root containers
(CKV_K8S_23)
🤖 Prompt for AI Agents