Skip to content

fix(docker): install compilers in the builder stage so arm64 builds - #16

Open
adamsrnmsu wants to merge 1 commit into
sandialabs:mainfrom
adamsrnmsu:fix-docker-arm64-build
Open

adamsrnmsu wants to merge 1 commit into
sandialabs:mainfrom
adamsrnmsu:fix-docker-arm64-build

Conversation

@adamsrnmsu

Copy link
Copy Markdown
Collaborator

Summary

The parseus image doesn't build on arm64 hosts (Apple Silicon, Graviton, arm64 phenix ranges). hdbscan and libsass publish no linux/arm64 wheels for Python 3.12, so pip compiles them from source. The python-builder stage has no compiler, so the build fails:

error: [Errno 2] No such file or directory: 'gcc'
ERROR: Failed building wheel for hdbscan
ERROR: Failed building wheel for libsass

This adds build-essential to the builder stage only. The runtime stage copies just /opt/venv, so the final image gets no toolchain.

Testing

  • docker build --platform linux/arm64 . on an arm64 host: fails on main, succeeds with this change.
  • In the arm64 image, python -c 'import hdbscan, sass' succeeds and reports aarch64.
  • End to end: an arm64 offline bundle staged from this branch (make stage) loaded and installed with manage_parseus.py install --method bundle on an arm64 Kali VM with no network: Install complete, elasticsearch and redis healthy, https://localhost/ returns 200.
  • amd64 is unchanged apart from extra packages in the builder stage; CI covers that build.

Found while making the kali-purple phenix image (sandialabs/sceptre-phenix-images#50) build on arm64.

🤖 Generated with Claude Code

hdbscan and libsass publish no linux/arm64 wheels for Python 3.12, so pip
builds them from source on arm64 hosts. The python-builder stage had no
compiler and the build failed with "No such file or directory: 'gcc'".

Install build-essential in the builder stage only. The runtime stage copies
just the venv, so the final image gains no toolchain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant