Error building docker image

未关闭
#13,567 4 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@laxmareddyp 已经在做这个了。

开始于 2025年4月18日。

评估

这个 Issue 还没有评估数据。

描述

type:support

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

主要语言
Python
星标
77.6k
派生
44.8k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tensorflow/models 的其他 Issue

查看 tensorflow/models 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。