Docker Container memory shortage

less than 1 minute read

Error Message:
RuntimeError: DataLoader worker (pid 4301) is killed by signal: Bus error. It is possible that dataloader's workers are out of shared memory. Please try to raise your shared memory limit.

ν•΄κ²°μ±…μœΌλ‘œλŠ”

–ipc ν˜Ήμ€ –shm-sizeλ₯Ό μ‚¬μš©ν•΄μ„œ docker run ν•˜λ©΄λœλ‹€.

ipc에 λŒ€ν•΄μ„œ 잠깐 κ²€μƒ‰ν•΄λ΄€λŠ”λ° μž κΉμœΌλ‘œλŠ” λΆ€μ‘±ν•  것 κ°™μ•„μ„œ

일단

  1. docker run –ipc=host
  2. docker run –shm-size=64G

μ •λ„μ˜ ν•΄κ²° 책이 μ œμ‹œλ˜μ–΄ μžˆμ—ˆλ‹€.

docker run -d -v `pwd`:/proj -it --name dev_dpfash3 --gpus all -p 8891:8891 --restart=always mydocker --shm-size=8G

Reference

docker μ»¨ν…Œμ΄λ„ˆμ—μ„œ pytorch μ‹€ν–‰μ‹œ λ©”λͺ¨λ¦¬ μ—λŸ¬ ν•΄κ²°: https://curioso365.tistory.com/136
[Trouble Shooting] 도컀 μ‚¬μš©μ‹œ 문제 λ°œμƒ 및 ν•΄κ²°: https://soyoung-new-challenge.tistory.com/70
kubernetes shared memory μ‚¬μ΄μ¦ˆ μ‘°μ •: https://ykarma1996.tistory.com/106

Leave a comment