Problems with pySDF in a docker container

Hello,

I have a problem with pysdf library. I’m using a modulus docker image v23.05 on a cluster and when I try to use tessellation I get this error message:

Error importing pysdf. Make sure 'libsdf.so' is in LD_LIBRARY_PATH and pysdf is installed
Traceback (most recent call last):
  File "heatsink_tesselation.py", line 8, in <module>
    from modulus.sym.geometry.tessellation import Tessellation
  File "/usr/local/lib/python3.8/dist-packages/modulus/sym/geometry/tessellation.py", line 25, in <module>
    import pysdf.sdf as pysdf
ImportError: libpysdf.so: cannot open shared object file: No such file or directory

I installed docker image specifically for using this feature but it doesn’t seem to work in my case. Is there anything I can do solve this issue?

Driver Version: 525.105.17; CUDA Version: 12.0; GPU: A100

Hi @gorpinich4

Can you launch an interactive docker session of the docker container and first check:

python
>>> import pysdf

If this doesn’t work check for libsdf.so in /external/lib/. This will be present in the container.

Now verify that this path is present in your LD_LIBRARY_PATH.

root@dgx:/external/lib# echo $LD_LIBRARY_PATH
/usr/local/cuda/compat/lib.real:/external/lib:/usr/local/lib/python3.8/dist-packages/torch/lib:/usr/local/lib/python3.8/dist-packages/torch_tensorrt/lib:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64

Make sure you are not somehow changing the LD_LIBRARY_PATH when running your container.

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