handsome-book-90365
11/11/2025, 7:18 AMNOTE: The SHMEM allocation limit is set to the default of 64MB. This may be
insufficient for PyG. NVIDIA recommends the use of the following flags:
docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 ...
and without this flag it is throwing bus error basically unable to allocate a large graph memory.
How do i set --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 in our batch jobs?ancient-application-36103
11/11/2025, 8:29 AMhandsome-book-90365
11/11/2025, 8:29 AMflaky-plumber-70709
11/11/2025, 5:03 PMflaky-plumber-70709
11/11/2025, 5:19 PMhandsome-book-90365
11/13/2025, 8:42 AMflaky-plumber-70709
11/13/2025, 9:57 AMsharedMemorySize
For ulimit that is on the parent containerProperties, in either case this would need to be a PR I think to expose. Definitely would be nice to have typed data models for this kind of thing and expose the whole thing, or at least an escape hatch to get at containerPropertiesflaky-plumber-70709
11/13/2025, 10:00 AMhandsome-book-90365
11/13/2025, 10:23 AMfrom metaflow import FlowSpec, step, batch
class LightGCNFlow(FlowSpec):
@batch(
gpu=1,
image="docker-image:latest",
container_properties={
"linuxParameters": {
"sharedMemorySize": 2147483648 # 2GB shm
},
"ulimits": [
{"name": "memlock", "softLimit": -1, "hardLimit": -1},
{"name": "stack", "softLimit": 67108864, "hardLimit": 67108864}
]
}
)
@step
def train(self):
import torch
import torch_geometric as pyg
print("Training LightGCN...")
# training code here
if __name__ == "__main__":
LightGCNFlow()
is this correct ?flaky-plumber-70709
11/13/2025, 11:21 AMhandsome-book-90365
11/17/2025, 6:45 AMhandsome-book-90365
11/17/2025, 9:23 AM