Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the aarch64 support broke pip install on docker builds with mac silicone #117

Open
ajbeach2 opened this issue Jan 15, 2025 · 6 comments

Comments

@ajbeach2
Copy link

ajbeach2 commented Jan 15, 2025

The following will fail. I am on apple m3 apple silicone mac os 14.6. Docker version 4.37.2 (179585)

  1. docker run -it python:3.12-slim sh
  2. pip wheel --no-cache-dir --use-pep517 "blis (==1.2.0)"
  error: subprocess-exited-with-error
  
  × Building wheel for blis (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      BLIS_COMPILER? None
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-aarch64-cpython-312/blis
      copying blis/about.py -> build/lib.linux-aarch64-cpython-312/blis
      copying blis/benchmark.py -> build/lib.linux-aarch64-cpython-312/blis
      copying blis/__init__.py -> build/lib.linux-aarch64-cpython-312/blis
      creating build/lib.linux-aarch64-cpython-312/blis/tests
      copying blis/tests/common.py -> build/lib.linux-aarch64-cpython-312/blis/tests
      copying blis/tests/test_gemm.py -> build/lib.linux-aarch64-cpython-312/blis/tests
      copying blis/tests/test_dotv.py -> build/lib.linux-aarch64-cpython-312/blis/tests
      copying blis/tests/__init__.py -> build/lib.linux-aarch64-cpython-312/blis/tests
      copying blis/cy.pyx -> build/lib.linux-aarch64-cpython-312/blis
      copying blis/py.pyx -> build/lib.linux-aarch64-cpython-312/blis
      copying blis/__init__.pxd -> build/lib.linux-aarch64-cpython-312/blis
      copying blis/cy.pxd -> build/lib.linux-aarch64-cpython-312/blis
      running build_ext
      Build options linux unix
      BUILD ARCH: cortexa57
      error: [Errno 2] No such file or directory: '/tmp/pip-wheel-8_a5mjiz/blis_33415535ba48470a96244b3ae8f5710e/blis/_src/make/linux-cortexa57.jsonl'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for blis
Failed to build blis
ERROR: Failed to build one or more wheels

Removing the aarch64 support broke docker builds on mac

@ajbeach2 ajbeach2 changed the title Unable to install in Docker python:3.12-slim (running on Apple Silicone) installing 1.2.0 Removing the aarch64 support broke pip install on docker builds with mac silicone Jan 15, 2025
@ajbeach2
Copy link
Author

This works:

apt-get update
apt-get install build-essentials
pip wheel --no-cache-dir --use-pep517 "blis (==1.1.0)"

@bryant0918
Copy link

Some other packages have already updated dependencies to blis>=1.2.0 such as coqui-ai's TTS. Need to fix this docker build issue asap.

@vegarab
Copy link

vegarab commented Jan 16, 2025

This is causing issues for blis 1.1.0 installs as well.

I have a spacy==3.8.3 dependency which resolves to require thinc==8.3.4. Both of these were published before blis==1.2.0 and specifically require blis = ">=1.1.0,<1.2.0" in my Poetry-produced lockfile.

However, when attempting to install (either with pip, uv, or poetry), the installer attempts to build blis==1.2.0, which fails.

#0 2.500       [stderr]
#0 2.500       error: [Errno 2] No such file or directory:
#0 2.500       '/root/.cache/uv/sdists-v6/pypi/blis/1.2.0/arXtTZ5_kVlsJETlfErCc/src/blis/_src/make/linux-cortexa57.jsonl'
#0 2.500 
#0 2.500       hint: This usually indicates a problem with the package or the build
#0 2.500       environment.
#0 2.500   help: `blis` (v1.2.0) was included because `spacy` (v3.8.3) depends on
#0 2.500         `thinc` (v8.3.4) which depends on `blis`

This has completely broken our build toolchain and we cannot reproduce builds from 2 weeks ago, with blis pinned to 1.1.0.

@convoliution
Copy link

convoliution commented Jan 16, 2025

This probably blocks anyone trying to install spacy>=3.8.0 on ARM-based Linux, due to an unfortunate limitation of Explosion's build infrastructure at the moment.

#116 has a good amount of explanation for the error we're all running into, but tl;dr it's because

This is not easily resolvable for users because these are build requirements, for which pip, uv, and Poetry use completely separate isolated environments; i.e. one cannot simply pre-install blis==1.1.0 to sidestep this problem—blis==1.2.0 will still get installed anyway during build time.

@SvenWesterlaken
Copy link

Capping spacy to spacy<3.8.0 seemed that have worked for me. Putting it here for anyone who comes across this issue before it gets fixed.

@rmartin16
Copy link

You can constrain the build requirements when building with pip using PIP_CONSTRAINT. I went in to more detail here; this is definitely a hack tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants