To summarize, you have tried 3 approaches (as also suggested in this thread 24):

Set num_workers=0 (i.e., self.config['Manager']['num_workers']=0) when calling DataLoader constructor;
Increase shared memory size;
Change the sharing strategy 75:

import torch.multiprocessing
torch.multiprocessing.set_sharing_strategy('file_system')

Can you try a few more suggestions in possible deadlock in dataloader · Issue #1355 · pytorch/pytorch · GitHub 82?
It seems that someone also tried ulimit -n or setNumThreads(0). If all the suggestions are exhausted, feel free to open a bug on Github.