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
|
||||
imagePullSecrets:
|
||||
- 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:
|
||||
- name: tts-gateway
|
||||
image: gitea.nik4nao.com/nik/tts-gateway:latest
|
||||
@ -118,14 +138,12 @@ spec:
|
||||
- name: tls
|
||||
secret:
|
||||
secretName: tts-gateway-tls
|
||||
# Checkpoint/config aren't baked into the sidecar image (still an
|
||||
# open decision per tts-gateway/README.md) - bind-mounted from
|
||||
# /data/tts-gateway on nik-gpu instead. Populate with G_790000.pth
|
||||
# and uma.json before this Deployment will go Ready.
|
||||
# Populated at pod start by the model-init init container above, copying from the
|
||||
# versioned gitea.nik4nao.com/nik/tts-model image - not a hostPath into nik-gpu's raw
|
||||
# disk, so this survives node reprovisioning and isn't tied to manual file placement.
|
||||
- name: models
|
||||
hostPath:
|
||||
path: /data/tts-gateway
|
||||
type: Directory
|
||||
emptyDir:
|
||||
sizeLimit: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user