Skip to content

Commit cb3c9b2

Browse files
committed
Refactor configmap, switch to watchfiles to detect symbolic link target changes, pull dynamically from configmap
Signed-off-by: Kunjan Patel <[email protected]>
1 parent 926a71c commit cb3c9b2

File tree

4 files changed

+163
-165
lines changed

4 files changed

+163
-165
lines changed

examples/dynamic-lora-sidecar/deployment.yaml

+23-6
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,26 @@ spec:
5656
valueFrom:
5757
secretKeyRef:
5858
name: hf-token # The name of your Kubernetes Secret
59-
key: HF_TOKEN # The specific key within the Secret
59+
key: token # The specific key within the Secret
6060
- name: DYNAMIC_LORA_ROLLOUT_CONFIG
6161
value: "/config/configmap.yaml"
6262
volumeMounts:
6363
- mountPath: /dev/shm
6464
name: dshm
6565
initContainers:
6666
- name: configmap-reader-1
67+
tty: true
68+
stdin: true
6769
image: us-docker.pkg.dev/kunjanp-gke-dev-2/lora-sidecar/sidecar:latest
6870
restartPolicy: Always
71+
imagePullPolicy: Always
6972
env:
70-
DYNAMIC_LORA_ROLLOUT_CONFIG: "/config/configmap.yaml"
73+
- name: DYNAMIC_LORA_ROLLOUT_CONFIG
74+
value: "/config/configmap.yaml"
7175
volumeMounts:
7276
- name: config-volume
73-
mountPath: /config/configmap.yaml
74-
subPath: configmap.yaml
77+
mountPath: /config
78+
# subPath: configmap.yaml
7579
volumes:
7680
- name: dshm
7781
emptyDir:
@@ -106,8 +110,21 @@ data:
106110
configmap.yaml: |
107111
vLLMLoRAConfig:
108112
host: localhost
109-
models:
113+
name: sql-loras-llama
114+
port: '8000'
115+
ensureExist:
116+
models:
110117
- base-model: meta-llama/Llama-2-7b-hf
111118
id: sql-lora-v1
112119
source: yard1/llama-2-7b-sql-lora-test
113-
name: sql-lora
120+
- base-model: meta-llama/Llama-2-7b-hf
121+
id: sql-lora-v3
122+
source: yard1/llama-2-7b-sql-lora-test
123+
- base-model: meta-llama/Llama-2-7b-hf
124+
id: sql-lora-v4
125+
source: yard1/llama-2-7b-sql-lora-test
126+
ensureNotExist:
127+
models:
128+
- base-model: meta-llama/Llama-2-7b-hf
129+
id: sql-lora-v2
130+
source: yard1/llama-2-7b-sql-lora-test
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
aiohttp==3.10.10
22
pyyaml==6.0.2
33
requests==2.32.3
4-
watchdog==5.0.3
4+
watchdog==5.0.3
5+
watchfiles==0.24.0
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
vLLMLoRAConfig:
22
host: localhost
3-
models:
4-
- base-model: meta-llama/Llama-2-7b-hf
5-
id: sql-lora-v1
6-
source: yard1/llama-2-7b-sql-lora-test
7-
status:
8-
errors:
9-
- ''
10-
operation: load
11-
timestamp: 2024-10-23 15:43:07 UTC+0000
12-
toRemove: false
13-
- base-model: meta-llama/Llama-2-7b-hf
14-
id: sql-lora-v2
15-
source: yard1/llama-2-7b-sql-lora-test
16-
status:
17-
errors:
18-
- already unloaded
19-
operation: unload
20-
timestamp: 2024-10-23 15:43:07 UTC+0000
21-
toRemove: true
223
name: sql-loras-llama
23-
port: '8000'
4+
port: 8000
5+
ensureExist:
6+
models:
7+
- base-model: meta-llama/Llama-2-7b-hf
8+
id: sql-lora-v1
9+
source: yard1/llama-2-7b-sql-lora-test
10+
ensureNotExist:
11+
models:
12+
- base-model: meta-llama/Llama-2-7b-hf
13+
id: sql-lora-v2
14+
source: yard1/llama-2-7b-sql-lora-test

0 commit comments

Comments
 (0)