Jetson scikit learn Error: scikit_learn.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block

Hello,

I am using YOLOP for my application.
I am using Jetson Xavier for my application.
Since there is no docker file, I created a custom dockerfile. Please find dockerfile attached. Docker build was successful. But when i run below command inside container as mentioned in the readme instruction for testing an image, i get below error and i am not able to figure out what is the issue and what is the solution.

command executed:
python3 tools/demo.py --source images/inp --save-dir images/outp

Error Log:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/sklearn/__check_build/__init__.py", line 44, in <module>
    from ._check_build import check_build  # noqa
ImportError: /usr/local/lib/python3.6/dist-packages/sklearn/__check_build/../../scikit_learn.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tools/demo.py", line 29, in <module>
    from lib.core.postprocess import morphological_process, connect_lane
  File "/yolop/lib/core/postprocess.py", line 6, in <module>
    from sklearn.cluster import DBSCAN
  File "/usr/local/lib/python3.6/dist-packages/sklearn/__init__.py", line 81, in <module>
    from . import __check_build  # noqa: F401
  File "/usr/local/lib/python3.6/dist-packages/sklearn/__check_build/__init__.py", line 46, in <module>
    raise_build_error(e)
  File "/usr/local/lib/python3.6/dist-packages/sklearn/__check_build/__init__.py", line 41, in raise_build_error
    %s""" % (e, local_dir, ''.join(dir_content).strip(), msg))
ImportError: /usr/local/lib/python3.6/dist-packages/sklearn/__check_build/../../scikit_learn.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block
___________________________________________________________________________
Contents of /usr/local/lib/python3.6/dist-packages/sklearn/__check_build:
__pycache__               _check_build.cpython-36m-aarch64-linux-gnu.so__init__.py
setup.py
___________________________________________________________________________
It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.

If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.

yolop.Dockerfile (4.3 KB)

Regards,
Monalisa

Hi,

Since scikit-learn is pre-installed in the l4t-ml container.
Would you mind building the container with l4t-ml base instead?

Thanks.

Ok i Shall try l4t-ml:r32.5.0-py3 as base image rather than nvcr.io/nvidia/l4t-pytorch:r32.5.0-pth1.7-py3 .

I am converting requirements.txt to docker.
As per above requirements.txt i need to have opencv-python>=4.1.2, but l4t-ml:r32.5.0-py3 contains OpenCV 4.1.1. Would you suggest me to overwrite this again inside Dockerfile?

My worries is i should not miss any thing from requirements.txt for my application using yolo panoptic.

My nvdia jetpack details are as follows:

Package: nvidia-jetpack
Version: 4.5-b129

Hello, Another question is that I am going to build my application using ros2 foxy and hence i used nvcr.io/nvidia/l4t-pytorch:r32.5.0-pth1.7-py3 initially. I hope changing the base image will not create any problem. It is just my guess and i am trying to avoid any rework.

Hello, I am unable to pull the base image as suggested above.

Step 1/16 : FROM l4t-ml:r32.5.0-py3
pull access denied for l4t-ml, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I am able to pull image with below command:
FROM nvcr.io/nvidia/l4t-ml:r32.5.0-py3

I will get back if it solves my original scikit-learn issue or not.

Hello,

I was able to use scikit-learn without any error with below base image.

FROM nvcr.io/nvidia/l4t-ml:r32.5.0-py3

Thanks for your support.

Regards,
Monalisa.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.