oso icon indicating copy to clipboard operation
oso copied to clipboard

Support linux aarch64

Open magicarm22 opened this issue 3 years ago • 25 comments

I'm trying to run the docker image on a Mac M1 laptop. But when docker container python:3.10-slim-bullseye tried to install oso, I got an error:

pipenv sync
[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement oso==0.26.0 (from versions: none)
[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for oso==0.26.0
ERROR: Couldn't install package: oso
 Package installation failed...

magicarm22 avatar Feb 16 '22 13:02 magicarm22

Hey @magicarm22

we currently don't have official support Linux arm64 builds for Python yet, however one of our community members has created a set of Python Oso Docker images which support aarch64 which you can use in these circumstances. In particular I think the documentation on copying over existing aarch64 builds from the source image into your own might be most relevant to your use-case.

patrickod avatar Feb 16 '22 22:02 patrickod

I was able to resolve this issue by setting platform: linux/amd64 in my docker-compose.yml.

Found it on this page: https://til.simonwillison.net/macos/running-docker-on-remote-m1

RonquilloAeon avatar Apr 05 '22 03:04 RonquilloAeon

@patrickod any timeline when will you have Linux aarch64 native Ruby gem?

nenaddzambasevic avatar Jun 27 '22 14:06 nenaddzambasevic

@nenaddzambasevic unfortunately I don't have an updated timeline to offer on Linux aarch64 support but I have noted it in our work tracker. Thanks for your patience on this.

patrickod avatar Jun 30 '22 22:06 patrickod

@patrickod, any update on this? I saw that v0.26.2 supports arm64, but on a local Macbook M1, pip install fails:

❯ docker run --rm -it python:3.9 bash
root@2136ca298f4c:/# uname -m
aarch64
root@2136ca298f4c:/# pip install oso
ERROR: Could not find a version that satisfies the requirement oso (from versions: none)
ERROR: No matching distribution found for oso
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@2136ca298f4c:/#

adilnaimi avatar Oct 03 '22 10:10 adilnaimi

I too have been experimenting with oso's golang library and have noticed that it fails to build with GOOS=linux GOARCH=arm64. I would be glad if oso's Linux aarch64 support would be provided. Any update on the roadmap?

fmatzy avatar Oct 11 '22 03:10 fmatzy

Hi @adilnaimi and @fmatzy, unfortunately no update yet, but your interest is registered. Thank you!

gj avatar Oct 11 '22 14:10 gj

I am getting the same issue. Running on a MacBook Pro with an Apple M1 Max chip.

amiran-gorgazjan avatar Feb 05 '23 10:02 amiran-gorgazjan

@gj @patrickod would you accept a PR adding Linux arm64 support for Go builds (in the https://github.com/osohq/oso/blob/main/.github/workflows/release.yml)?

omusil24 avatar Mar 01 '23 09:03 omusil24

@omusil24 happily!

gj avatar Mar 01 '23 15:03 gj

@gj made a PR here: https://github.com/osohq/oso/pull/1678

omusil24 avatar Mar 07 '23 08:03 omusil24

is it possible to make a new release with this minor change only?

andrewkoltsov avatar May 19 '23 16:05 andrewkoltsov

Hey @andrewkoltsov, #1678 was released as part of 0.27.0

gj avatar May 19 '23 23:05 gj

@gj at this moment with out platform specification I'm getting ERROR: Could not find a version that satisfies the requirement oso==0.27.0 (from versions: none) on arm mac, but with platform: linux/amd64 all good

andrewkoltsov avatar May 22 '23 15:05 andrewkoltsov

@andrewkoltsov what version of golang are you using? And do you have CGO_ENABLED=1 set when building?

omusil24 avatar May 22 '23 15:05 omusil24

As far as I can see the "only" thing required now is to release wheels for aarch64 on PyPi (when we are talking about the Python bindings).

I hit this issue, because I can install oso without any issues on an M1 MacBook. But when running it under docker (which is Linux aarch64 containers) it failed.

kevinvalk avatar Aug 06 '23 21:08 kevinvalk

Any update on that, does someone know who can do a release wheels for aarch64 please?

pcorpet avatar Oct 13 '23 11:10 pcorpet

Interested in using oso python but can't install it for this same reason :(

dacevedo12 avatar Oct 26 '23 00:10 dacevedo12

Our team would be willing to do this if we have instructions on what we need to do for the PR. I don't use mac, but I'm a little surprised Oso hasn't solved this in over a year.

bazylhorsey avatar Nov 03 '23 15:11 bazylhorsey

As far as I can see the "only" thing required now is to release wheels for aarch64 on PyPi (when we are talking about the Python bindings).

The goal is to get a wheel for linux/arm64 in https://pypi.org/project/oso/#files

This probably happens in the release process where the platform linux/arm64 should be added.

pcorpet avatar Nov 03 '23 19:11 pcorpet

Hi @nenaddzambasevic and @Ataraxic, Linux AArch64 support for Ruby landed in 0.27.3 thanks to @jdeff.

gj avatar Jan 13 '24 04:01 gj

I can't install Python 0.27.3 on aarch64:

docker run --rm -it public.ecr.aws/docker/library/python:3.12 bash
root@2a8ca20a5cb3:/# uname -m
aarch64
root@2a8ca20a5cb3:/# pip install oso
ERROR: Could not find a version that satisfies the requirement oso (from versions: none)
ERROR: No matching distribution found for oso

root@2a8ca20a5cb3:/# pip install oso==0.27.3
ERROR: Could not find a version that satisfies the requirement oso==0.27.3 (from versions: none)
ERROR: No matching distribution found for oso==0.27.3

root@2a8ca20a5cb3:/#

adilnaimi avatar Jan 13 '24 13:01 adilnaimi

@andrewkoltsov what version of golang are you using? And do you have CGO_ENABLED=1 set when building?

to be honest i don't know, I'm installing it from pypi (oso = "~=0.27.0")

andrewkoltsov avatar Jan 14 '24 21:01 andrewkoltsov

For Python linux aarch64 wheels, it could be as simple as ~adding CIBW_ARCHS_LINUX: "auto aarch64" to the cibuildwheel step (and maybe installing qemu if missing).~ adding a separate aarch64 wheel cibuildwheel step that copies the polar library and then runs cibuildwheel for aarch64. Do any oso folks have a minute to test this out?

tpetr avatar Jan 18 '24 22:01 tpetr