MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Open3D import issue

Open taeinkwon opened this issue 6 years ago • 5 comments

Hello,

I am trying to import Open3D but I got the following error.

Traceback (most recent call last): File "test.py", line 1, in import open3d File "/azureml-envs/azureml_1b18fe6d3f445740557538c7ce7c9459/lib/python3.6/site-packages/open3d/init.py", line 35, in from .open3d import * # py2 py3 compatible ImportError: libGL.so.1: cannot open shared object file: No such file or directory

2020/07/11 08:10:21 Failed to run the wrapper cmd with err: exit status 1 2020/07/11 08:10:21 mpirun version string: { Intel(R) MPI Library for Linux* OS, Version 2018 Update 3 Build 20180411 (id: 18329) Copyright 2003-2018 Intel Corporation. } 2020/07/11 08:10:21 MPI publisher: intel ; version: 2018 2020/07/11 08:10:21 Process Exiting with Code: 1

I am using the following estimator. est = Estimator( compute_target=compute_target, source_directory=script_folder, entry_script='test.py', script_params=script_params, conda_packages=['mesa-libgl-cos6-x86_64','python==3.6.8', 'numpy', 'opencv', 'pytest-shutil', 'scipy', 'tqdm', 'matplotlib'], pip_packages= ['opencv-python-headless','open3d==0.8.0','pickle5','glob3'], #open3d==0.9.0 use_gpu=False )

I imported 'mesa-libgl-cos6-x86_64' and 'opencv-python-headless', still it doesn't work.

Do you know how to solve this problem?

taeinkwon avatar Jul 11 '20 08:07 taeinkwon

can you please share your dockerfile/base image and python dependencies of the environment

vizhur avatar Jul 11 '20 17:07 vizhur

I am using a default base image that is created automatically. Python dependencies of the environment are like the followings

conda_packages=['mesa-libgl-cos6-x86_64','python==3.6.8', 'numpy', 'opencv', 'pytest-shutil', 'scipy', 'tqdm', 'matplotlib'], pip_packages= ['opencv-python-headless','open3d==0.8.0','pickle5','glob3']

I got Estimator from "from azureml.train.estimator import Estimator"

taeinkwon avatar Jul 11 '20 22:07 taeinkwon

I tested this with other conditions and it works well without Open3d.

taeinkwon avatar Jul 11 '20 22:07 taeinkwon

You can try default gpu image for the environment, or custom docker file with apt get the dependency you need

Environment class: https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.environment(class)?view=azure-ml-py Samples: https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/training/using-environments/using-environments.ipynb

vizhur avatar Jul 11 '20 23:07 vizhur

Running with the default gpu image also does not work. However, now I succeed to run using custom docker. Thank you.

taeinkwon avatar Jul 12 '20 14:07 taeinkwon