Quick update on trying to run pants inside a conta...
# general
n
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
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
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
ah awesome thanks! šŸ™‚
I couldn't do
pip install pantsbuild.pants
on my ARM, so not sure what was missing there?
h
we never recommend doing
pip install
. https://www.pantsbuild.org/docs/installation
n
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
ohhhhhh, yeah we dont yet have linux arm support https://github.com/pantsbuild/pants/issues/12183
r
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
The problem is that my container only has 4GB memory, so I can't build locally before it runs into horrible paging issues...
r
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
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
Thanks Moshe!