<#4423 [Core feature] Make shared memory a first-c...
# flyte-github
c
#4423 [Core feature] Make shared memory a first-class citizen Issue created by cosmicBboy ### Motivation: Why do you think this is important? Many frameworks, like pytorch, rely on shared memory as an intermediate place to store data when it forks processes for things like dataloading. Currently this requires a custom PodTemplate to enable, see here for example: finetuning_pod_template = flytekit.PodTemplate( primary_container_name="mycontainer", pod_spec=V1PodSpec( containers=[ V1Container( name="mycontainer", volume_mounts=[V1VolumeMount(mount_path="/dev/shm", name="dshm")] ) ], volumes=[ V1Volume( name="dshm", empty_dir=V1EmptyDirVolumeSource(medium="", size_limit="200Gi") ) ] ), ) Otherwise the task will error out with something like
Copy code
DataLoader worker (pid(s) 468) exited unexpectedly
### Goal: What should the final outcome look like, ideally? The outcome should make this use case a first-class citizen in flyte:
Copy code
@task(requests=Resources(shared_mem="100Gi"))
def fn(): ...
### Describe alternatives you've considered The fall back is to use
PodTemplate
, but this requires knowledge of k8s and isn't the smoothest experience ### Propose: Link/Inline OR Additional context No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte