8000 Unable to build Python package -CMake < 3.5 issues? ; Docker also unable to build - ARM issues? · Issue #169 · absadiki/subsai · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unable to build Python package -CMake < 3.5 issues? ; Docker also unable to build - ARM issues? #169
Open
@victorhooi

Description

@victorhooi

I was super excited to try this package out =) (I'm hearing impaired),

At first, I thought I'd build it locally, using uv. At first I got an error related to Python versions:

victorhooi@ampere-01 ~/c/subsai (main)> uv sync
    Updated https://github.com/m-bain/whisperx.git (8c58c54635cd6ee2d9d8665a3cf789863f6ed700)
  × No solution found when resolving dependencies:
  ╰─▶ Because the requested Python version (>=3.8) does not satisfy Python>=3.9,<3.13 and whisperx==3.3.1 depends on Python>=3.9,<3.13, we can conclude that whisperx==3.3.1 cannot be used.
      And because only whisperx==3.3.1 is available and your project depends on whisperx, we can conclude that your project's requirements are unsatisfiable.

      hint: The `requires-python` value (>=3.8) includes Python versions that are not supported by your dependencies (e.g., whisperx==3.3.1 only supports >=3.9, <3.13). Consider using a more restrictive
      `requires-python` value (like >=3.9, <3.13).
victorhooi@ampere-01 ~/c/subsai (main) [1]> ls
Dockerfile  LICENSE  README.md  assets/  docker-compose.yml  docs/  examples/  mkdocs.yml  pyproject.toml  requirements.txt  src/  tests/
victorhooi@ampere-01 ~/c/subsai (main)> vim pyproject.toml
victorhooi@ampere-01 ~/c/subsai (main)> uv sync
    Updated https://github.com/m-bain/whisperx.git (8c58c54635cd6ee2d9d8665a3cf789863f6ed700)
  × Failed to build `openai-whisper==20240930`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stderr]
      <string>:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Traceback (most recent call last):
        File "<string>", line 14, in <module>
          requires = get_requires_for_build({})
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpPjmc37/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpPjmc37/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpPjmc37/lib/python3.13/site-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpPjmc37/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 21, in <module>
        File "<string>", line 11, in read_version
      KeyError: '__version__'

      hint: This usually indicates a problem with the package or the build environment.
  help: `openai-whisper` (v20240930) was included because `subsai` (v1.6.1) depends on `openai-whisper==20240930`

Anyway, I then did a uv python install 3.11, and specified 3.11 for uv sync - however, I then got Cmake build errors:

victorhooi@ampere-01 ~/c/subsai (main) [1]> uv sync --python 3.11
Resolved 193 packages in 2ms
  × Failed to build `pywhispercpp==1.3.0`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      copying ./pywhispercpp/constants.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp
      copying ./pywhispercpp/model.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp
      copying ./pywhispercpp/__init__.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp
      copying ./pywhispercpp/utils.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp
      copying ./pywhispercpp/examples/livestream.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp/examples
      copying ./pywhispercpp/examples/recording.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp/examples
      copying ./pywhispercpp/examples/__init__.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp/examples
      copying ./pywhispercpp/examples/assistant.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp/examples
      copying ./pywhispercpp/examples/main.py -> build/lib.linux-aarch64-cpython-311/pywhispercpp/examples
      running egg_info
      writing pywhispercpp.egg-info/PKG-INFO
      writing dependency_links to pywhispercpp.egg-info/dependency_links.txt
      writing entry points to pywhispercpp.egg-info/entry_points.txt
      writing requirements to pywhispercpp.egg-info/requires.txt
      writing top-level names to pywhispercpp.egg-info/top_level.txt
      reading manifest file 'pywhispercpp.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'pywhispercpp.egg-info/SOURCES.txt'
      running build_ext
      -- Configuring incomplete, errors occurred!

      [stderr]
      ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
      warning: no files found matching 'version.txt'
      warning: no previously-included files found matching 'whisper.cpp/**/*.o'
      warning: no previously-included files found matching 'whisper.cpp/**/*.so'
      warning: no previously-included files found matching 'whisper.cpp/**/*.a'
      warning: no previously-included files found matching 'whisper.cpp/**/*.dylib'
      warning: no previously-included files found matching 'whisper.cpp/**/*.dll'
      warning: no previously-included files found matching 'whisper.cpp/**/*.lib'
      CMake Error at pybind11/CMakeLists.txt:8 (cmake_minimum_required):
        Compatibility with CMake < 3.5 has been removed from CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
        to tell CMake that the project requires at least <min> but has been updated
        to work with policies introduced by <max> or earlier.

        Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


      Traceback (most recent call last):
        File "<string>", line 11, in <module>
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/build_meta.py", line 432, in build_wheel
          return _build(['bdist_wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/build_meta.py", line 423, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
          self.run_setup()
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 232, in <module>
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/__init__.py", line 115, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
          self.run_command(cmd)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "<string>", line 188, in run
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
          self.run_command("build")
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 96, in run
          _build_ext.run(self)
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 368, in run
          self.build_extensions()
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 484, in build_extensions
          self._build_extensions_serial()
        File "/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 510, in _build_extensions_serial
          self.build_extension(ext)
        File "<string>", line 154, in build_extension
        File "/home/victorhooi/.local/share/uv/python/cpython-3.11.12-linux-aarch64-gnu/lib/python3.11/subprocess.py", line 571, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['cmake', '/home/victorhooi/.cache/uv/sdists-v9/pypi/pywhispercpp/1.3.0/RrJaxGY-4VIXo0gZBnuDS/src',
      '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/victorhooi/.cache/uv/sdists-v9/pypi/pywhispercpp/1.3.0/RrJaxGY-4VIXo0gZBnuDS/src/build/lib.linux-aarch64-cpython-311/',
      '-DPYTHON_EXECUTABLE=/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/bin/python', '-DCMAKE_BUILD_TYPE=Release', '-DEXAMPLE_VERSION_INFO=1.3.0', '-GNinja',
      '-DCMAKE_MAKE_PROGRAM:FILEPATH=/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/bin/ninja', '-DATUIN_SESSION=0196f2cf3db7744ca4c514264c4eb9b8', '-DCLICOLOR_FORCE=1',
      '-DDBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus', '-DHOME=/home/victorhooi', '-DLANG=en_US.UTF-8', '-DLOGNAME=victorhooi', '-DMOTD_SHOWN=pam',
      '-DPATH=/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD/bin:/home/victorhooi/.local/bin:/home/victorhooi/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/games',
      '-DPWD=/home/victorhooi/code/subsai', '-DPYTHONIOENCODING=utf-8:backslashreplace', '-DSHELL=/usr/bin/fish', '-DSHLVL=1', '-DSSH_CLIENT=10.5.1.59 52184 22', '-DSSH_CONNECTION=10.5.1.59 52184
      10.5.1.132 22', '-DSSH_TTY=/dev/pts/21', '-DTERM=xterm-ghostty', '-DUSER=victorhooi', '-DUV=/home/victorhooi/.local/bin/uv', '-DVIRTUAL_ENV=/home/victorhooi/.cache/uv/builds-v0/.tmpghbaiD',
      '-DXDG_RUNTIME_DIR=/run/user/1000', '-DXDG_SESSION_CLASS=user', '-DXDG_SESSION_ID=58735', '-DXDG_SESSION_TYPE=tty', '-DLC_CTYPE=C.UTF-8', '-DPLAT=linux-aarch64']' returned non-zero exit status 1.

      hint: This usually indicates a problem with the package or the build environment.
  help: `pywhispercpp` (v1.3.0) was included because `subsai` (v1.6.1) depends on `pywhispercpp`

I then thought, aha, let's try to build the docker image...that should be fairly foolproof =):

victorhooi@ampere-01 ~/c/subsai (main) [1]> docker compose build
WARN[0000] /home/victorhooi/code/subsai/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
Compose can now delegate builds to bake for better performance.
 To do so, set COMPOSE_BAKE=true.
[+] Building 345.9s (11/23)                                                                                                                                                                             docker:default
 => [subsai-webui-cpu internal] load build definition from Dockerfile                                                                                                                                             0.1s
 => => transferring dockerfile: 614B                                                                                                                                                                              0.0s
 => [subsai-webui internal] load build definition from Dockerfile                                                                                                                                                 0.1s
 => => transferring dockerfile: 614B                                                                                                                                                                              0.0s
 => [subsai-webui internal] load metadata for docker.io/pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime                                                                                                             2.6s
 => [subsai-webui internal] load .dockerignore                                                                                                                                                                    0.1s
 => => transferring context: 268B                                                                                                                                                                                 0.0s
 => [subsai-webui-cpu internal] load .dockerignore                                                                                                                                                                0.0s
 => => transferring context: 268B                                                                                                                                                                                 0.0s
 => [subsai-webui internal] load build context                                                                                                                                                                    0.2s
 => => transferring context: 13.54MB                                                                                                                                                                              0.2s
 => [subsai-webui 1/9] FROM docker.io/pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime@sha256:82e0d379a5dedd6303c89eda57bcc434c40be11f249ddfadfd5673b84351e806                                                     340.6s
 => => resolve docker.io/pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime@sha256:82e0d379a5dedd6303c89eda57bcc434c40be11f249ddfadfd5673b84351e806                                                                    0.0s
 => => sha256:82e0d379a5dedd6303c89eda57bcc434c40be11f249ddfadfd5673b84351e806 1.37kB / 1.37kB                                                                                                                    0.0s
 => => sha256:26551f1051e710ecfc62bf6396fc67722f2ae0489be5e8cc6b7fc8de0926866e 4.85kB / 4.85kB                                                                                                                    0.0s
 => => sha256:99803d4b97f3db529ae9ca4174b0951afac6b309e7deaa8ec3214c584e02b3a8 28.58MB / 28.58MB                                                                                                                  4.7s
 => => sha256:4ade0a4bc5d597c845bc3c27c47453522019ee188adbc4110029bbea11e5adec 9.99MB / 9.99MB                                                                                                                    2.6s
 => => sha256:035a286326d65b413051a4c52e7df0037d89f1075f7be98c9586d1c856ace994 3.11GB / 3.11GB                                                                                                                  258.8s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                                                                                                          2.9s
 => => sha256:2185b402c9ca9c9a1e03db5b387fe9a1dc43c1247bf41199b18e901c2e44ff35 99B / 99B                                                                                                                          3.4s
 => => extracting sha256:99803d4b97f3db529ae9ca4174b0951afac6b309e7deaa8ec3214c584e02b3a8                                                                                                                         1.6s
 => => extracting sha256:4ade0a4bc5d597c845bc3c27c47453522019ee188adbc4110029bbea11e5adec                                                                                                                         1.1s
 => => extracting sha256:035a286326d65b413051a4c52e7df0037d89f1075f7be98c9586d1c856ace994                                                                                                                        79.9s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                                                                         0.0s
 => => extracting sha256:2185b402c9ca9c9a1e03db5b387fe9a1dc43c1247bf41199b18e901c2e44ff35                                                                                                                         0.0s
 => [subsai-webui-cpu internal] load build context                                                                                                                                                                0.2s
 => => transferring context: 13.54MB                                                                                                                                                                              0.2s
 => [subsai-webui 2/9] WORKDIR /subsai                                                                                                                                                                            1.8s
 => [subsai-webui 3/9] COPY requirements.txt .                                                                                                                                                                    0.1s
 => ERROR [subsai-webui-cpu 4/9] RUN apt-get update &&     apt-get upgrade -y &&     apt-get install -y git &&     apt-get -y install gcc mono-mcs &&     rm -rf /var/lib/apt/lists/*                             0.6s
------
 > [subsai-webui-cpu 4/9] RUN apt-get update &&     apt-get upgrade -y &&     apt-get install -y git &&     apt-get -y install gcc mono-mcs &&     rm -rf /var/lib/apt/lists/*:
0.591 exec /bin/sh: exec format error
------
failed to solve: process "/bin/sh -c apt-get update &&     apt-get upgrade -y &&     apt-get install -y git &&     apt-get -y install gcc mono-mcs &&     rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 255

However, it seems there's an arch problem here? (This is on ARM). Do you know if the Docker image is x64 only? Or is there some way to get it running on ARM?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0