fix(docker): actually disable pytantan SIMD via scikit-build-core config-settings - #66
fix(docker): actually disable pytantan SIMD via scikit-build-core config-settings#66nextgenusfs wants to merge 1 commit into
Conversation
…fig-settings The merged Dockerfile from PR #65 set CMAKE_ARGS='-DHAVE_AVX2=OFF ...' as a shell env-var when invoking pip. scikit-build-core (pytantan's build backend) filters CMAKE_ARGS inconsistently and the HAVE_AVX2 override never reached the inner CMake invocation, so the published image still shipped pytantan/platform/avx2.*.so and SIGILLed at `import pytantan` under Rosetta 2 on Apple Silicon. Switch to scikit-build-core's documented channel for forwarding -D options: pip install --config-settings=cmake.define.HAVE_AVX2=OFF ... which lands directly in the cmake command line and short-circuits pytantan's FindAVX2.cmake via its '(DEFINED HAVE_AVX2)' guard. Also add an in-Dockerfile verification step that: 1. Errors out if pytantan/platform/{avx2,sse4,neon}*.so exists. 2. Disassembles every .so under the pytantan install dir with objdump -d -M intel and errors out if any of ymm[0-9]+, zmm[0-9]+, vpbroadcast*, vextracti128, vinserti128 appear. 3. Imports the public pytantan API to exercise the dispatch path. If any guard trips, the Docker build fails and no broken image is published. Fixes the still-SIGILLing image at sha256:e21a45c4aebc5d756179b3e772a9bbb0eb96e544e6c5c5d89538a73908d154dc.
|
Closing — no Dockerfile changes are needed. The Dockerfile on The real reason Fix is to publish a new |
Problem
PR #65 attempted to disable AVX2 in the in-Dockerfile pytantan rebuild by setting
CMAKE_ARGS="-DHAVE_AVX2=OFF ..."as a shell env-var when invokingpip. scikit-build-core (pytantan's build backend) filtersCMAKE_ARGSinconsistently, and theHAVE_AVX2override never reached the inner CMake invocation. The published image still shippedpytantan/platform/avx2.*.soand SIGILLed atimport pytantanunder Rosetta 2 on Apple Silicon:(Reported against
sha256:e21a45c4aebc5d756179b3e772a9bbb0eb96e544e6c5c5d89538a73908d154dc, the:latesttag at the time of writing.)Fix
Switch to scikit-build-core's documented channel for forwarding
-Doptions:These land directly on the inner cmake command line and short-circuit pytantan's
FindAVX2.cmakevia itsif(DEFINED HAVE_AVX2)guard, so the build skipspytantan/platform/avx2.*.soentirely and pytantan's runtime dispatch falls back to the pure-C++genericbackend.Guard rails
Add an in-Dockerfile verification step so silent regressions can never publish another broken image:
pytantan/platform/{avx2,sse4,neon}*.soexists after the rebuild.objdump -d -M intelevery.sounder the pytantan install dir and hard-fail if any ofymm[0-9]+,zmm[0-9]+,vpbroadcast*,vextracti128,vinserti128appear.python -c "from pytantan import Alphabet, RepeatFinder, default_scoring_matrix"to exercise the public dispatch path.If any guard trips, the Docker build fails and no broken image is published.
Test plan
Supersedes #65 (which I'm closing).
Pull Request opened by Augment Code with guidance from the PR author