Skip to content

Commit 61b14fc

Browse files
committed
Add gcsfuse settings for McJAX
1 parent f0f6f0e commit 61b14fc

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/xpk/commands/workload.py

+16
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@
117117
xpk.google.com/workload: {args.workload}
118118
annotations:
119119
{storage_annotations}
120+
gke-gcsfuse/volumes: "true"
121+
gke-gcsfuse/cpu-limit: "500m"
122+
gke-gcsfuse/memory-limit: "350Gi"
123+
gke-gcsfuse/ephemeral-storage-limit: "40Gi"
120124
spec:
121125
schedulerName: {args.scheduler}
122126
restartPolicy: Never
@@ -130,10 +134,22 @@
130134
dnsPolicy: ClusterFirstWithHostNet
131135
terminationGracePeriodSeconds: {args.termination_grace_period_seconds}
132136
containers:
137+
- name: gke-gcsfuse-sidecar
138+
image: gcr.io/gcs-tess/gcs-fuse-csi-driver-sidecar-mounter:v2.10.0_linux_amd64
133139
{container}
134140
serviceAccountName: {service_account}
135141
volumes:
136142
{volumes}
143+
- name: gcs-ckpt-pvc
144+
persistentVolumeClaim:
145+
claimName: ckpt-bucket-pvc
146+
- name: gcs-dataset-pvc
147+
persistentVolumeClaim:
148+
claimName: cached-dataset-bucket-pvc
149+
- name: gke-gcsfuse-cache
150+
emptyDir:
151+
medium: Memory
152+
sizeLimit: 100Gi
137153
"""
138154

139155

src/xpk/core/docker_resources.py

+6
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ def get_volume_mounts(args, system: SystemCharacteristics) -> str:
227227
"""
228228
volume_mount_yaml = """- mountPath: /dev/shm
229229
name: dshm-2
230+
- mountPath: /tmp/dataset
231+
name: gcs-dataset-pvc
232+
readOnly: false
233+
- mountPath: /tmp/gcsfuse
234+
name: gcs-ckpt-pvc
235+
readOnly: false
230236
"""
231237

232238
if args.ramdisk_directory != '':

0 commit comments

Comments
 (0)