Closed tscurtu closed 11 months ago
haha i just did exactly this feature, almost the same way https://github.com/pwais/sematic/blob/e311b10923ae40fa2c070dab5a9cf2f121112c0a/sematic/resolvers/resource_requirements.py#L247
will there be a feature eventually for allowing pods to use persistent volume claims? and/or a CSI to provision storage? for PVCs, that might be a slightly cleaner / more explicit way to use host path volumes. for a CSI, then sematic job pods can start requesting block storage in a more cloud-agnostic way. e.g. there is CSI for NFS, CIFS etc.
also aside: i think a very common solution to the pytorch-needs-more-shm problem is not to expand the container shm but rather just use ipc=host
or hostIPC: true
in k8s-talk. personally after i added volume support, i was gonna try next to add hostIPC: true
as a ResourceRequest
or something ...
Actually i would disagree that a PV / PVC be required. It's super useful to just mount hostpath for a variety of things, and it's part of K8S for good reason.
PV / PVC you have to create them in the cluster, and that can sometimes be hard to set up right to work wit auto-scaling.
Introduces the capability of mounting paths from the underlying node filesystem into the Worker pod.
This is added as a new
ResourceRequirements
parameter.The documentation is updated to cover the new capability, and to cover other missing capabilities.
Testing
The unit tests are updated to cover the new functionality:
The Testing Pipeline is enhanced with a new parameter to test mounting paths, and writing to and reading from them inside the Worker pods. The existing
ResourceRequirements
testing, which only covered shared memory mount expansion, is also refactored, and enhanced to check its effects.Expanded shared memory Function logs:
Validated manually that this would print
64 MB
for the shared memory when the flag is not actually set.Host path mounts Function logs: