Skip to content

Issue: Failed to load libtilert.so due to undefined symbol _ZN3c104cuda29c10_cuda_check_implementationEiPKcS2_ib #6

@wusar

Description

@wusar

Issue: Failed to load libtilert.so due to undefined symbol _ZN3c104cuda29c10_cuda_check_implementationEiPKcS2_ib

Description

When running the generate script in a Docker environment, I encounter an error loading the libtilert.so library due to an undefined symbol related to PyTorch's CUDA checks.

Error Log

(tilert) [root@d9878fa39ee8 workspace]# python generate.py     --model-weights-dir "/home/model_weights" 2>&1 | tee generate.log
Traceback (most recent call last):
  File "/opt/conda/envs/tilert/lib/python3.12/site-packages/tilert/__init__.py", line 38, in _load_library
    return ctypes.CDLL(str(lib_path))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/tilert/lib/python3.12/ctypes/__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /opt/conda/envs/tilert/lib/python3.12/site-packages/tilert/libtilert.so: undefined symbol: _ZN3c104cuda29c10_cuda_check_implementationEiPKcS2_ib

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/workspace/generate.py", line 9, in <module>
    from tilert import logger, tilert_init
  File "/opt/conda/envs/tilert/lib/python3.12/site-packages/tilert/__init__.py", line 43, in <module>
    _load_library("libtilert.so")
  File "/opt/conda/envs/tilert/lib/python3.12/site-packages/tilert/__init__.py", line 40, in _load_library
    raise RuntimeError(f"Failed to load library from {lib_path}") from e
RuntimeError: Failed to load library from /opt/conda/envs/tilert/lib/python3.12/site-packages/tilert/libtilert.so

Environment

  • Running in Docker container

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions