square-agency-59624
10/09/2025, 5:59 AMRuntimeError: unable to write to file </torch_43_535998925_0>: No space left on device (28)ancient-wolf-19325
10/09/2025, 6:00 AM/dev/shm) for Flyte tasks, use the shared_memory argument in the @task decorator. You can set it to True to use the node's allocatable memory, or specify a size like "10Gi" for a fixed amount. For example:
from flytekit import task
@task(shared_memory="10Gi")
def my_task():
...
This ensures the pod running your task has a /dev/shm volume of the specified size, resolving "No space left on device" errors for libraries like PyTorch. This feature is available in Flyte 1.15.0 and later. For more details, see the Flyte 1.15.0 release notes.
Would you like more detail on how this works or how to verify the configuration?
Sources:
- Flyte 1.15.0 release notes 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.