https://pantsbuild.org/ logo
n

numerous-waitress-55735

05/02/2022, 3:10 PM
Quick update on trying to run pants inside a container on my M1 Mac. Pants doesn't have binary wheels on Linux arm, so I had to build from source. Here are a few notes.
ā€¢ Using incorrect Python interpreter by default.
PY=/opt/kalyke/venv/jupyter/bin/python3.10
in error message? ā€¢ Check for
rustup
earlier in the process? ā€¢ Build requires > 4GB memory
Instead of using the Python interpreter from $PATH, it used the system's Python interpreter šŸ™‚
h

hundreds-father-404

05/02/2022, 3:12 PM
Which release? We do release wheels for M1s. Only I have not yet gotten to the releases from this weekend because I was moving from Arizona to Mexico City
r

rhythmic-morning-87313

05/02/2022, 3:13 PM
I think it is going to be fixed in the next release, https://github.com/pantsbuild/pants/pull/15294 I'm also relying on
PY
currently.
n

numerous-waitress-55735

05/02/2022, 3:13 PM
ah awesome thanks! šŸ™‚
I couldn't do
pip install pantsbuild.pants
on my ARM, so not sure what was missing there?
h

hundreds-father-404

05/02/2022, 3:14 PM
we never recommend doing
pip install
. https://www.pantsbuild.org/docs/installation
n

numerous-waitress-55735

05/02/2022, 3:14 PM
To clarify: this is a container running on my M1 Mac, so I need Linux ARM support.
@limited-restaurant-78045 yeah I know šŸ™‚
I never follow recommendations. šŸ˜›
h

hundreds-father-404

05/02/2022, 3:15 PM
ohhhhhh, yeah we dont yet have linux arm support https://github.com/pantsbuild/pants/issues/12183
r

rhythmic-morning-87313

05/02/2022, 3:16 PM
I'm working with a QEMU-based Linux aarch64 machine on M1 Mac, and it works great as long as you apply a small patch as in https://github.com/pantsbuild/pants/issues/12183#issuecomment-1003180020
šŸ™Œ 1
n

numerous-waitress-55735

05/02/2022, 3:16 PM
The problem is that my container only has 4GB memory, so I can't build locally before it runs into horrible paging issues...
r

rhythmic-morning-87313

05/02/2022, 3:16 PM
you may need to adjust the code a little bit in the latest master though
i think you could build pants in another container and copy it into the target container using docker multi-stage build, and follow https://www.pantsbuild.org/docs/running-pants-from-sources
n

numerous-waitress-55735

05/03/2022, 10:04 PM
I'm still going through the oracle vetting process for free tier access. After I get it, will start prototyping building linux arm packages. Cc @happy-kitchen-89482 @enough-analyst-54434
šŸ™ 1
e

enough-analyst-54434

05/03/2022, 11:01 PM
Thanks Moshe!
6 Views