<@U06RKAMK0UC> I'm seeing this error on my tasks. ...
# ask-ai
s
@ancient-wolf-19325 I'm seeing this error on my tasks. It seems like shm related issue. How to configure shm on the pods?
Copy code
RuntimeError: unable to write to file </torch_43_535998925_0>: No space left on device (28)
a
To configure shared memory (
/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:
Copy code
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.