Skip to content

Error building docker image #13567

Open
Open

Description

@B0ndo2

I received the following error trying to build docker image (building on Fedora 41)

git clone https://github.com/tensorflow/models.git
docker build -f research/object_detection/dockerfiles/tf2/Dockerfile -t od .
1594.1   Building wheel for dm-tree (setup.py): started
1594.3   Building wheel for dm-tree (setup.py): finished with status 'error'
1594.3   ERROR: Command errored out with exit status 1:
1594.3    command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mv6ae7oq/dm-tree_8adbc9ddfb4743cc85c9797ca7a2ca57/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mv6ae7oq/dm-tree_8adbc9ddfb4743cc85c9797ca7a2ca57/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7awv070v
1594.3        cwd: /tmp/pip-install-mv6ae7oq/dm-tree_8adbc9ddfb4743cc85c9797ca7a2ca57/
1594.3   Complete output (55 lines):
1594.3   running bdist_wheel
1594.3   running build
1594.3   running build_py
1594.3   creating build
1594.3   creating build/lib.linux-x86_64-3.6
1594.3   creating build/lib.linux-x86_64-3.6/tree
1594.3   copying tree/__init__.py -> build/lib.linux-x86_64-3.6/tree
1594.3   copying tree/sequence.py -> build/lib.linux-x86_64-3.6/tree
1594.3   copying tree/tree_benchmark.py -> build/lib.linux-x86_64-3.6/tree
1594.3   copying tree/tree_test.py -> build/lib.linux-x86_64-3.6/tree
1594.3   running build_ext
1594.3   Traceback (most recent call last):
1594.3     File "/tmp/pip-install-mv6ae7oq/dm-tree_8adbc9ddfb4743cc85c9797ca7a2ca57/setup.py", line 77, in _check_build_environment
1594.3       subprocess.check_call(['cmake', '--version'])
1594.3     File "/usr/lib/python3.6/subprocess.py", line 306, in check_call
1594.3       retcode = call(*popenargs, **kwargs)
1594.3     File "/usr/lib/python3.6/subprocess.py", line 287, in call
1594.3       with Popen(*popenargs, **kwargs) as p:
1594.3     File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
1594.3       restore_signals, start_new_session)
1594.3     File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
1594.3       raise child_exception_type(errno_num, err_msg, err_filename)
1594.3   FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'

1608.9     Traceback (most recent call last):
1608.9       File "<string>", line 1, in <module>
1608.9       File "/tmp/pip-install-mv6ae7oq/dm-tree_8adbc9ddfb4743cc85c9797ca7a2ca57/setup.py", line 155, in <module>
1608.9         keywords='tree nest flatten',
1608.9       File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 144, in setup
1608.9         return distutils.core.setup(**attrs)
1608.9       File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
1608.9         dist.run_commands()
1608.9       File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
1608.9         self.run_command(cmd)
1608.9       File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
1608.9         cmd_obj.run()
1608.9       File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 61, in run
1608.9         return orig.install.run(self)
1608.9       File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
1608.9         self.run_command('build')
1608.9       File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
1608.9         self.distribution.run_command(command)
1608.9       File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
1608.9         cmd_obj.run()
1608.9       File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
1608.9         self.run_command(cmd_name)
1608.9       File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
1608.9         self.distribution.run_command(command)
1608.9       File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
1608.9         cmd_obj.run()
1608.9       File "/tmp/pip-install-mv6ae7oq/dm-tree_8adbc9ddfb4743cc85c9797ca7a2ca57/setup.py", line 70, in run
1608.9         self._check_build_environment()
1608.9       File "/tmp/pip-install-mv6ae7oq/dm-tree_8adbc9ddfb4743cc85c9797ca7a2ca57/setup.py", line 82, in _check_build_environment
1608.9         ) from e
1608.9     RuntimeError: CMake must be installed to build the following extensions: _tree

Activity

  1. B0ndo2 commented on Apr 19, 2025

    @B0ndo2
    Author

    Added the following line to Dockerfile

    RUN  pip install cmake
    

    before

    RUN python -m pip install .
    
  2. B0ndo2 commented on Apr 19, 2025

    @B0ndo2
    Author

    After stating the container and running the following command to test, I get this error

    tensorflow@5b1f52947aed:~/models/research$ python object_detection/builders/model_builder_tf2_test.py
    Traceback (most recent call last):
      File "object_detection/builders/model_builder_tf2_test.py", line 21, in <module>
        import tensorflow.compat.v1 as tf
      File "/home/tensorflow/.local/lib/python3.6/site-packages/tensorflow/__init__.py", line 438, in <module>
        _ll.load_library(_main_dir)
      File "/home/tensorflow/.local/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py", line 154, in load_library
        py_tf.TF_LoadLibrary(lib)
    tensorflow.python.framework.errors_impl.NotFoundError: /usr/local/lib/python3.6/dist-packages/tensorflow/core/kernels/libtfkernel_sobol_op.so: undefined symbol: _ZN10tensorflow8OpKernel11TraceStringEPNS_15OpKernelContextEb
    
    
  3. B0ndo2 commented on Apr 22, 2025

    @B0ndo2
    Author

    Any help over here ?

  4. Alita41 commented on Mar 10, 2026

    @Alita41

    Hi, I’m working on this issue and will submit a PR once I have a fix ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions