-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance dynamic lora adapter support for auth enabled scenario (#571)
* Support auth for bearer tokens in mocked app * Get credentials from Lora CR and append to HTTP header * Add lora api-key integration testing scripts * Fix the lint issue --------- Signed-off-by: Jiaxin Shan <[email protected]>
- Loading branch information
Showing
6 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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,22 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mock-llama2-7b | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
adapter.model.aibrix.ai/enabled: "true" | ||
model.aibrix.ai/name: "llama2-7b" | ||
app: "mock-llama2-7b" | ||
template: | ||
spec: | ||
serviceAccountName: mocked-app-sa | ||
containers: | ||
- name: llm-engine | ||
image: aibrix/vllm-mock:nightly | ||
command: | ||
- python3 | ||
- app.py | ||
- --api_key | ||
- test-key-1234567890 |
This file contains 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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
resources: | ||
- ../templates/deployment | ||
- components.yaml | ||
|
||
# enable following patch when we test lora + api-key | ||
patches: | ||
- path: api-key-patch.yaml |
This file contains 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
flask | ||
Flask-HTTPAuth | ||
kubernetes | ||
numpy | ||
pandas | ||
|
This file contains 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: model.aibrix.ai/v1alpha1 | ||
kind: ModelAdapter | ||
metadata: | ||
name: text2sql-lora-2 | ||
namespace: default | ||
labels: | ||
model.aibrix.ai/name: "text2sql-lora-2" | ||
model.aibrix.ai/port: "8000" | ||
spec: | ||
baseModel: llama2-7b | ||
podSelector: | ||
matchLabels: | ||
model.aibrix.ai/name: llama2-7b | ||
artifactURL: huggingface://yard1/llama-2-7b-sql-lora-test | ||
additionalConfig: | ||
api-key: test-key-1234567890 | ||
schedulerName: default |
This file contains 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