well... I have some work to do still: ```<http://g...
# proj-agent
n
well... I have some work to do still:
Copy code
gitlab.wolfspyre.io:5009/wpl_containers/openhands/runtime_0.54.0                            latest                     c396060e56da   14 minutes ago   7.63GB
gitlab.wolfspyre.io:5009/wpl_containers/openhands/openhands_0.54.0                          latest                     4a27c11b5a14   11 hours ago     2.09GB
to suss out why my openhands container's larger than upstream:
Copy code
docker.all-hands.dev/all-hands-ai/runtime                                                   0.54-nikolaik              6cf5096189d6   4 days ago       9.23GB
docker.all-hands.dev/all-hands-ai/openhands                                                 0.54                       41e4de30642b   4 days ago       1.78GB
but I'm mildly pleased at shaving a gig from the runtime
Celebrating... even the most pedestrian of accomplishments....
p
I know you don't like Elon, but his idea to remove things before optimizing strikes a chord here šŸ™‚ nice work; will you PR to mainline OpenHands?
n
A) ain't 'his' idea. 's been a( n un)common practice for long before he was an eng lead B) I could if it was desired ... I've been operating in a > Show yer work, and if the maintainers want to incorporate it, they'll ask for you to PR it.... Mindset for a long time .... 's why I post wot I do ... I don't wanna seem like I think my shit doesn't stink. I don't wanna undermine the success of the project... I figure if the maintainers like any of the concepts/ideas/stuff I share, they'll ask me for a PR and I'll do the needful .... but if they don't want it... pushing a PR is a detractor from the momentum and often doesn't have sufficient context to be easily understood
my intent was to see if it actually works .... it did not. šŸ™‚ I broke a buncha shit. so pulling in upstream and backing some of the changes out to get back to some semblance of stability and trying again
šŸ˜… 1
There IS, however, some legit benefit to glean:
Under the covers, a docker container is a bunch of tar.gz layers. by default, docker uses gzip to compress each layer. IF INSTALLED, docker will use
pigz
for DECOMPRESSION of the layer(s) which leverages multicore to expedite the decompression ... IT DOES NOT USE
pigz
FOR COMPRESSION however (as this makes the hash non-idempotent thus drastically reducing registry cachability) and we all know how much of a hard time docker has with irs registry ... If you switch the compression algo to
zstd
you'll get: • better compression than gzip • the use of multicore for both compression and decompression • you can switch the compression-level attribute from 0-22 ā—¦ cue spinal tap 'to 11' references šŸ˜› I am unaware of any mainstream registries that do not support zstd, but I'm not sure if its ubiquitous. it might be worth trying to see how it plays with the cloudy infra... What I'm experimenting with now:
Copy code
docker buildx build --output type=image,name=gitlab.wolfspyre.io:5009/wpl_containers/openhands/openhands,compression=zstd,compression-level=10,force-compression=true,push=true \
--progress=plain \
-t gitlab.wolfspyre.io:5009/wpl_containers/openhands/openhands:0.54.0 \
-t gitlab.wolfspyre.io:5009/wpl_containers/openhands/openhands:250822 \
-t gitlab.wolfspyre.io:5009/wpl_containers/openhands/openhands:latest \
 --build-arg=BASE_REGISTRY  --build-arg=FILE_STORE --build-arg=FILE_STORE_PATH --build-arg=OPENHANDS_BUILD_VERSION  --build-arg=APP_GID --build-arg=OPENHANDS_USER_ID --build-arg=POETRY_CACHE_DIR  --build-arg=PYTHONPATH --build-arg=RUN_AS_OPENHANDS --build-arg=SANDBOX_LOCAL_RUNTIME_URL --build-arg=SANDBOX_USER_ID --build-arg=SANDBOX_WORKSPACE \
--platform linux/amd64 --provenance=false \
--cache-to=type=local,compression=zstd,compression-level=4,dest=/data/containers/,mode=max \
--cache-from=type=local,compression=zstd,compression-level=4,src=/data/containers/ \
-f /data/OpenHands/containers/app/Dockerfile \
/data/OpenHands/
also there are SEVERAL binaries within both containers which are unstripped of debug symbols... (I'm looking at you, NODE .... the 130mb binary hidden in playwright's system packages workdir ... stripping it makes it about 20mb lighter without any real downside)
🤣 1
turns out stripping .so libs is a bad idea šŸ™‚ I was pretty sure of this, but ...... who cares, its a docker container .... WOW did things not work right at all tho šŸ˜‰