Fork me on GitHub
#babashka-sci-dev
<
2023-02-03
>
borkdude18:02:30

@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

borkdude18:02:44

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

borkdude18:02:18

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

lispyclouds23:02:07

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

lispyclouds23:02:21

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

lispyclouds23:02:40

armv7 vs armv9 has issues iirc

borkdude09:02:36

This is on my mac with:

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

borkdude09:02:51

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

lispyclouds16:02:51

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

lispyclouds16:02:14

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

borkdude16:02:29

I tried ubuntu

lispyclouds16:02:27

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

lispyclouds16:02:47

whats the usecase for passing the platform flag?

lispyclouds16:02:39

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

borkdude16:02:59

I got a message when I didn't provide it

lispyclouds16:02:31

is this docker desktop youre running?

borkdude16:02:32

$ 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 

lispyclouds16:02:05

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

lispyclouds16:02:37

can you try colima?

borkdude16:02:44

what's that?

lispyclouds16:02:24

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

borkdude16:02:48

ok installing

borkdude16:02:19

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

lispyclouds16:02:37

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

lispyclouds16:02:44

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

borkdude16:02:18

I've installed colima, now what?

lispyclouds16:02:40

need to stop docker desktop

borkdude16:02:49

yes, done that, and then?

lispyclouds16:02:58

usual docker cmds should work

lispyclouds16:02:10

this will use the colima vm now

borkdude16:02:18

is it a drop-in replacement for docker?

borkdude16:02:38

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

lispyclouds16:02:55

no, the cli is from the docker desktop

lispyclouds16:02:17

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

lispyclouds16:02:00

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

lispyclouds16:02:12

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

borkdude16:02:23

yep, the aarch64 works great here too

lispyclouds16:02:40

yeah something's off in desktop

lispyclouds16:02:59

this is how container runtimes should work

borkdude16:02:24

ok, I'll keep using this ;)

lispyclouds16:02:53

not sure why its giving arm7l in desktop

borkdude16:02:35

ah fuck that

lispyclouds16:02:50

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

lispyclouds17:02:31

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

lispyclouds17:02:45

also it may affect you. so yeah colima ftw