Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions k8s/deploy/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ resources:
- sampler-router.yaml
- redis.yaml
- api-server.yaml
- worker-prepull.yaml

generatorOptions:
disableNameSuffixHash: true
Expand Down
43 changes: 43 additions & 0 deletions k8s/deploy/base/worker-prepull.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Pulls the worker image onto every GPU node the scheduler may use, at deploy
# time instead of inside the first job. A worker image pull takes minutes on a
# fresh node, and a cold job pays it for its trainer and its sampler. The
# container only sleeps and holds no GPU. The kustomize images transformer
# rewrites the image like every other OpenRL image, so a release that bumps
# the tag re-pulls on every node as the DaemonSet rolls.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: open-rl-worker-prepull
labels:
app: open-rl-worker-prepull
spec:
selector:
matchLabels:
app: open-rl-worker-prepull
updateStrategy:
type: RollingUpdate
rollingUpdate:
# Nothing runs here, so every node can pull at once.
maxUnavailable: 100%
template:
metadata:
labels:
app: open-rl-worker-prepull
spec:
nodeSelector:
openrl.io/enabled: "true"
# GPU nodes only: TPU nodes run a different worker image and keep their taint.
tolerations:
- key: nvidia.com/gpu
operator: Exists
effect: NoSchedule
containers:
- name: prepull
image: ghcr.io/gke-labs/open-rl/server:latest
command: ["sleep", "infinity"]
resources:
requests:
cpu: 10m
memory: 16Mi
limits:
memory: 64Mi
10 changes: 10 additions & 0 deletions k8s/deploy/kind-dra/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ configMapGenerator:
- ENABLE_GCP_TRACE="0"

patches:
# Workers pull from the cluster-local registry, so there is nothing to pre-pull.
- target:
kind: DaemonSet
name: open-rl-worker-prepull
patch: |
$patch: delete
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: open-rl-worker-prepull
- path: pvc-local.yaml

- target:
Expand Down
12 changes: 12 additions & 0 deletions k8s/deploy/lora-kind/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,15 @@ namespace: openrl-system
resources:
- ../base
- storage.yaml

patches:
# Workers pull from the cluster-local registry, so there is nothing to pre-pull.
- target:
kind: DaemonSet
name: open-rl-worker-prepull
patch: |
$patch: delete
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: open-rl-worker-prepull
Loading