babashka-sci-dev

borkdude 2023-02-03T18:54:30.235329Z

@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

borkdude 2023-02-03T18:54:44.266359Z

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

borkdude 2023-02-03T18:56:18.802399Z

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

borkdude 2023-02-04T09:51:36.488079Z

This is on my mac with:

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

borkdude 2023-02-04T09:51:51.678799Z

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

lispyclouds 2023-02-04T16:38:51.768499Z

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

lispyclouds 2023-02-04T16:41:14.540109Z

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

borkdude 2023-02-04T16:41:29.091189Z

I tried ubuntu

lispyclouds 2023-02-04T16:42:27.949519Z

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

lispyclouds 2023-02-04T16:43:47.022209Z

whats the usecase for passing the platform flag?

lispyclouds 2023-02-04T16:44:39.791529Z

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

borkdude 2023-02-04T16:44:49.776249Z

dunno

borkdude 2023-02-04T16:44:59.688619Z

I got a message when I didn't provide it

lispyclouds 2023-02-04T16:45:31.103119Z

is this docker desktop youre running?

borkdude 2023-02-04T16:45:32.855189Z

$ 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 

borkdude 2023-02-04T16:45:35.532309Z

yes

lispyclouds 2023-02-04T16:46:05.184729Z

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

lispyclouds 2023-02-04T16:46:37.647469Z

can you try colima?

borkdude 2023-02-04T16:46:44.747789Z

what's that?

lispyclouds 2023-02-04T16:46:58.452019Z

https://github.com/abiosoft/colima i pasted above

lispyclouds 2023-02-04T16:47:24.681539Z

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

borkdude 2023-02-04T16:47:48.430589Z

ok installing

borkdude 2023-02-04T16:48:19.924109Z

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

lispyclouds 2023-02-04T16:48:37.286919Z

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

lispyclouds 2023-02-04T16:49:44.368249Z

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

borkdude 2023-02-04T16:51:18.439879Z

I've installed colima, now what?

lispyclouds 2023-02-04T16:51:30.658599Z

colima start

lispyclouds 2023-02-04T16:51:40.161019Z

need to stop docker desktop

borkdude 2023-02-04T16:51:49.719259Z

yes, done that, and then?

lispyclouds 2023-02-04T16:51:58.354219Z

usual docker cmds should work

lispyclouds 2023-02-04T16:52:10.728529Z

this will use the colima vm now

borkdude 2023-02-04T16:52:18.066359Z

is it a drop-in replacement for docker?

lispyclouds 2023-02-04T16:52:21.249669Z

yep

borkdude 2023-02-04T16:52:38.930259Z

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

lispyclouds 2023-02-04T16:52:55.684539Z

no, the cli is from the docker desktop

lispyclouds 2023-02-04T16:53:17.736599Z

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

borkdude 2023-02-04T16:53:31.638689Z

ah great

lispyclouds 2023-02-04T16:54:00.641959Z

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

lispyclouds 2023-02-04T16:55:12.304829Z

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

borkdude 2023-02-04T16:55:23.525199Z

yep, the aarch64 works great here too

borkdude 2023-02-04T16:55:26.508059Z

in colima

lispyclouds 2023-02-04T16:55:40.828589Z

yeah something's off in desktop

lispyclouds 2023-02-04T16:55:59.457089Z

this is how container runtimes should work

borkdude 2023-02-04T16:56:24.426609Z

ok, I'll keep using this ;)

lispyclouds 2023-02-04T16:56:53.659879Z

not sure why its giving arm7l in desktop

borkdude 2023-02-04T16:57:35.030949Z

ah fuck that

borkdude 2023-02-04T16:57:50.632809Z

colima ftw

lispyclouds 2023-02-04T16:57:50.754619Z

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

lispyclouds 2023-02-04T17:00:31.222309Z

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

lispyclouds 2023-02-04T17:01:45.623929Z

also it may affect you. so yeah colima ftw

lispyclouds 2023-02-03T23:14:07.311089Z

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

lispyclouds 2023-02-03T23:16:21.611749Z

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

lispyclouds 2023-02-03T23:16:40.625599Z

armv7 vs armv9 has issues iirc