Skip to content

Instantly share code, notes, and snippets.

@pavgup
Created October 3, 2019 22:34
Show Gist options
  • Save pavgup/826289918d00fd041847d7cb5587854a to your computer and use it in GitHub Desktop.
Save pavgup/826289918d00fd041847d7cb5587854a to your computer and use it in GitHub Desktop.
example of how to request network file storage and how to mount it
➜ ucsf-cdhi-pedfast cat ucsf-cdhi-pefast-cephfs.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ucsf-cdhi-pedfast-fs-pvc
namespace: ucsf-cdhi-pedfast
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 800Gi
storageClassName: csi-cephfs
➜ ucsf-cdhi-pedfast cat shared-file-storage-tensorflow.yaml
apiVersion: v1
kind: Pod
metadata:
name: ucsf-cdhi-pedfast-shared-fs-tf
namespace: ucsf-cdhi-pedfast
spec:
containers:
- name: ucsf-cdhi-pedfast-shared-fs-tf
image: tensorflow/tensorflow:latest-gpu
args: ["sleep", "infinity"]
volumeMounts:
- mountPath: /ucsf-cdhi-pedfast-fs-pvc
name: ucsf-cdhi-pedfast-fs-pvc
- mountPath: /dev/shm
name: dshm
resources:
limits:
nvidia.com/gpu: 1
restartPolicy: Never
volumes:
- name: dshm
emptyDir:
medium: Memory
- name: ucsf-cdhi-pedfast-fs-pvc
persistentVolumeClaim:
claimName: ucsf-cdhi-pedfast-fs-pvc
➜ ucsf-cdhi-pedfast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment