oso
oso copied to clipboard
Support linux aarch64
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...
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.
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
@patrickod any timeline when will you have Linux aarch64 native Ruby gem?
@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, 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:/#
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?
Hi @adilnaimi and @fmatzy, unfortunately no update yet, but your interest is registered. Thank you!
I am getting the same issue. Running on a MacBook Pro with an Apple M1 Max chip.
@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 happily!
@gj made a PR here: https://github.com/osohq/oso/pull/1678
is it possible to make a new release with this minor change only?
Hey @andrewkoltsov, #1678 was released as part of 0.27.0
@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 what version of golang are you using? And do you have CGO_ENABLED=1
set when building?
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.
Any update on that, does someone know who can do a release wheels for aarch64 please?
Interested in using oso python but can't install it for this same reason :(
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.
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.
Hi @nenaddzambasevic and @Ataraxic, Linux AArch64 support for Ruby landed in 0.27.3 thanks to @jdeff.
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:/#
@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")
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?