babashka-sci-dev 2023-02-03

@rahul080327 It seems uname -m returns armv7l on linux docker in arm64. This isn't detected as arm in the babashka install script so you get the arm64 binary

What would be the full list that has to be supported to install arm?

Hmm, the aarch64 binary doesn't run in my arm64 linux docker anyway. Something to investigate

This is on my mac with:

docker run --rm -it --platform=linux/arm ubuntu

and then I downloaded the aarch64 linux binary, both static and unstatic

tried just now on my M1 mac too. seems to work. installed via the installer script. this is my system

$ uname -a
Linux 5393828354a8 5.15.82-0-virt #1-Alpine SMP Mon, 12 Dec 2022 09:15:17 +0000 aarch64 aarch64 aarch64 GNU/Linux

$ file `which bb`
/usr/local/bin/bb: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=408ae146e436327e9b41cb9e0105a6f5a9929d51, for GNU/Linux 3.7.0, with debug_info, not stripped

huh, if i pass --platform=linux/arm even the container refuses to boot:

$ docker run --rm -it --platform=linux/arm ubuntu
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
860e874323ae: Pull complete
Digest: sha256:9a0bdde4188b896a372804be2384015e90e3f84906b750c1a53539b585fbbe7f
Status: Downloaded newer image for ubuntu:latest
exec /bin/bash: exec format error

I tried ubuntu

not sure if its something to do with the docker emulation here. im running https://github.com/abiosoft/colima and everything works if i dont pass the --platform=linux/arm

whats the usecase for passing the platform flag?

ideally the container runtime should select the right ones based on the host i think

I got a message when I didn't provide it

is this docker desktop youre running?

$ docker run --rm -it ubuntu
WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@b0a3955bacd1:/#releases 

this seems to be a bug there, this should just work

can you try colima?

what's that?

this is my work machine, cant run docker desktop for license reasons 😛

ok installing

oh it's lima, but then +co, I see

yep, this is all the rage now. death to docker it seems

somehow it seems the docker desktop's vm has a difference in arch from the host

I've installed colima, now what?

colima start

need to stop docker desktop

yes, done that, and then?

usual docker cmds should work

this will use the colima vm now

is it a drop-in replacement for docker?

so it fucked up my docker desktop install by replacing the docker cmd?

no, the cli is from the docker desktop

you can say colima stop and start desktop for the original way

nothing really changes from the cli perspective. its two totally different vms it talks to via the socket

i use colima and brew install docker which only installs the CLI not the deamon

yep, the aarch64 works great here too

yeah something's off in desktop

this is how container runtimes should work

ok, I'll keep using this ;)

not sure why its giving arm7l in desktop

ah fuck that

maybe try deleting the desktop vm and try the new docker 23 stuff?

keep desktop around, theres this issue with bind mounts: https://github.com/abiosoft/colima/issues/102 but this is also a thing one should not be doing that way, but it could break some things

also it may affect you. so yeah colima ftw

what is the host architecture of the linux machine running docker?

there could be a difference in the arm versions of the binary we build on the CI vs the machine youre running on

armv7 vs armv9 has issues iirc