trampgeek / jobeinabox

The dockerfile and doc for building the Docker image JobeInABox
MIT License
12 stars 29 forks source link

Numpy installation: failed to map segment from shared object #4

Closed cloudmountofficial closed 3 years ago

cloudmountofficial commented 3 years ago

Hi!

I ran into the following error while trying to import numpy. import numpy works inside the python3 interactive session from cli inside the docker. Might be related to this issue ?

Error:

***Error***
Traceback (most recent call last):
  File "__tester__.python3", line 1, in <module>
    import numpy as np
  File "/usr/local/lib/python3.6/dist-packages/numpy/__init__.py", line 152, in <module>
    from . import random
  File "/usr/local/lib/python3.6/dist-packages/numpy/random/__init__.py", line 181, in <module>
    from . import _pickle
  File "/usr/local/lib/python3.6/dist-packages/numpy/random/_pickle.py", line 1, in <module>
    from .mtrand import RandomState
  File "_bit_generator.pxd", line 14, in init numpy.random.mtrand
ImportError: /usr/local/lib/python3.6/dist-packages/numpy/random/_bit_generator.cpython-36m-x86_64-linux-gnu.so: failed to map segment from shared object
trampgeek commented 3 years ago

This is probably just a memory error. See for example this CodeRunner thread. If you're using Jobe from CodeRunner, customise the question, expand the _Advanced Customisation panel and set a much larger memory limit (or use 0 in the first instance, which turns off memory limits). If you're using Jobe from the raw REST API, add a memlimit parameter to the request - see examples in testsubmit.py, e.g. when running Octave.

cloudmountofficial commented 3 years ago

Thanks for the help. Yep, it turned out to be a memory error. Works fine when I set the limit to 0.