feat: add init container for model initialization and change models volume to emptyDir
Some checks failed
validate / lint (push) Failing after 1s
Some checks failed
validate / lint (push) Failing after 1s
This commit is contained in:
parent
4257e83522
commit
710f3be427
@ -31,6 +31,26 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: gitea-registry-secret
|
- name: gitea-registry-secret
|
||||||
|
# Populates the shared `models` emptyDir from the tts-model image before tts-sidecar
|
||||||
|
# starts - see tts-gateway/model/Dockerfile in the home-service repo (the checkpoint/
|
||||||
|
# hparams are committed there directly and CI builds+pushes this image like the other
|
||||||
|
# four). Mounted at /dest, not /models: the model image already has the files baked in
|
||||||
|
# at /models in its own layer, so mounting the shared volume there would shadow the
|
||||||
|
# very files this container needs to copy from.
|
||||||
|
initContainers:
|
||||||
|
- name: model-init
|
||||||
|
image: gitea.nik4nao.com/nik/tts-model:latest
|
||||||
|
command: ["cp", "-a", "/models/.", "/dest/"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: models
|
||||||
|
mountPath: /dest
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 16Mi
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 64Mi
|
||||||
containers:
|
containers:
|
||||||
- name: tts-gateway
|
- name: tts-gateway
|
||||||
image: gitea.nik4nao.com/nik/tts-gateway:latest
|
image: gitea.nik4nao.com/nik/tts-gateway:latest
|
||||||
@ -118,14 +138,12 @@ spec:
|
|||||||
- name: tls
|
- name: tls
|
||||||
secret:
|
secret:
|
||||||
secretName: tts-gateway-tls
|
secretName: tts-gateway-tls
|
||||||
# Checkpoint/config aren't baked into the sidecar image (still an
|
# Populated at pod start by the model-init init container above, copying from the
|
||||||
# open decision per tts-gateway/README.md) - bind-mounted from
|
# versioned gitea.nik4nao.com/nik/tts-model image - not a hostPath into nik-gpu's raw
|
||||||
# /data/tts-gateway on nik-gpu instead. Populate with G_790000.pth
|
# disk, so this survives node reprovisioning and isn't tied to manual file placement.
|
||||||
# and uma.json before this Deployment will go Ready.
|
|
||||||
- name: models
|
- name: models
|
||||||
hostPath:
|
emptyDir:
|
||||||
path: /data/tts-gateway
|
sizeLimit: 1Gi
|
||||||
type: Directory
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user