labgrid icon indicating copy to clipboard operation
labgrid copied to clipboard

Unable to build the Docker container from the instructions

Open graugans opened this issue 1 year ago • 3 comments

What I did:

git clone https://github.com/labgrid-project/labgrid.git
cd labgrid/
git checkout -b v24.0 v24.0
docker build --target labgrid-coordinator -t nexus3.dev.ifm:18443/labgrid-coordinator:24.0 -f dockerfiles/Dockerfile .

This is the error I do receive:

------
 > [labgrid-coordinator 1/1] RUN set -e ;    cd /opt/labgrid ;    pip3 install --break-system-packages virtualenv ;    SETUPTOOLS_SCM_PRETEND_VERSION="$VERSION" pip3 install --break-system-packages --no-cache-dir . ;    virtualenv -p python3 crossbar-venv ;    crossbar-venv/bin/pip3 install --break-system-packages -r crossbar-requirements.txt ;    sed -i "s#^  executable: .*$#  executable: python3#" .crossbar/config-anonymous.yaml:
1.112 Collecting virtualenv
1.455   Downloading virtualenv-20.26.3-py3-none-any.whl.metadata (4.5 kB)
1.563 Collecting distlib<1,>=0.3.7 (from virtualenv)
1.619   Downloading distlib-0.3.8-py2.py3-none-any.whl.metadata (5.1 kB)
1.800 Collecting filelock<4,>=3.12.2 (from virtualenv)
1.853   Downloading filelock-3.15.4-py3-none-any.whl.metadata (2.9 kB)
1.986 Collecting platformdirs<5,>=3.9.1 (from virtualenv)
2.041   Downloading platformdirs-4.2.2-py3-none-any.whl.metadata (11 kB)
2.152 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB)
2.502    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 19.9 MB/s eta 0:00:00
2.557 Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
2.639 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
2.720 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
2.799 Installing collected packages: distlib, platformdirs, filelock, virtualenv
3.102 Successfully installed distlib-0.3.8 filelock-3.15.4 platformdirs-4.2.2 virtualenv-20.26.3
3.103 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
3.696 Processing /opt/labgrid
3.699   Installing build dependencies: started
6.742   Installing build dependencies: finished with status 'done'
6.743   Getting requirements to build wheel: started
6.848   Getting requirements to build wheel: finished with status 'error'
6.852   error: subprocess-exited-with-error
6.852
6.852   × Getting requirements to build wheel did not run successfully.
6.852   │ exit code: 1
6.852   ╰─> [40 lines of output]
6.852       Traceback (most recent call last):
6.852         File "/usr/local/lib/python3.11/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
6.852           main()
6.852         File "/usr/local/lib/python3.11/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
6.852           json_out['return_val'] = hook(**hook_input['kwargs'])
6.852                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6.852         File "/usr/local/lib/python3.11/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
6.852           return hook(config_settings)
6.852                  ^^^^^^^^^^^^^^^^^^^^^
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
6.852           return self._get_build_requires(config_settings, requirements=[])
6.852                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 297, in _get_build_requires
6.852           self.run_setup()
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 313, in run_setup
6.852           exec(code, locals())
6.852         File "<string>", line 1, in <module>
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/__init__.py", line 108, in setup
6.852           return distutils.core.setup(**attrs)
6.852                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 146, in setup
6.852           _setup_distribution = dist = klass(attrs)
6.852                                        ^^^^^^^^^^^^
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/dist.py", line 278, in __init__
6.852           _Distribution.__init__(self, dist_attrs)
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 286, in __init__
6.852           self.finalize_options()
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools/dist.py", line 630, in finalize_options
6.852           ep(self)
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools_scm/_integration/setuptools.py", line 123, in infer_version
6.852           _assign_version(dist, config)
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools_scm/_integration/setuptools.py", line 58, in _assign_version
6.852           _version_missing(config)
6.852         File "/tmp/pip-build-env-tygcu3v7/overlay/local/lib/python3.11/dist-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
6.852           raise LookupError(
6.852       LookupError: setuptools-scm was unable to detect version for /opt/labgrid.
6.852
6.852       Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
6.852
6.852       For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
6.852       [end of output]
6.852
6.852   note: This error originates from a subprocess, and is likely not a problem with pip.
7.287 error: subprocess-exited-with-error
7.287
7.287 × Getting requirements to build wheel did not run successfully.
7.287 │ exit code: 1
7.287 ╰─> See above for output.
7.287
7.287 note: This error originates from a subprocess, and is likely not a problem with pip.
------
Dockerfile:41
--------------------
  40 |
  41 | >>> RUN set -e ;\
  42 | >>>     cd /opt/labgrid ;\
  43 | >>>     pip3 install --break-system-packages virtualenv ;\
  44 | >>>     SETUPTOOLS_SCM_PRETEND_VERSION="$VERSION" pip3 install --break-system-packages --no-cache-dir . ;\
  45 | >>>     virtualenv -p python3 crossbar-venv ;\
  46 | >>>     crossbar-venv/bin/pip3 install --break-system-packages -r crossbar-requirements.txt ;\
  47 | >>>     sed -i "s#^  executable: .*\$#  executable: python3#" .crossbar/config-anonymous.yaml
  48 |
--------------------
ERROR: failed to solve: process "/bin/sh -c set -e ;    cd /opt/labgrid ;    pip3 install --break-system-packages virtualenv ;    SETUPTOOLS_SCM_PRETEND_VERSION=\"$VERSION\" pip3 install --break-system-packages --no-cache-dir . ;    virtualenv -p python3 crossbar-venv ;    crossbar-venv/bin/pip3 install --break-system-packages -r crossbar-requirements.txt ;    sed -i \"s#^  executable: .*\\$#  executable: python3#\" .crossbar/config-anonymous.yaml" did not complete successfully: exit code: 1

I am not sure if this is related to: https://github.com/pypa/setuptools_scm/issues/1011

graugans avatar Aug 15 '24 08:08 graugans