Skip to content

devops : add llama in all docker images#25035

Merged
angt merged 1 commit into
ggml-org:masterfrom
angt:devops-add-llama-in-all-docker-images
Jun 26, 2026
Merged

devops : add llama in all docker images#25035
angt merged 1 commit into
ggml-org:masterfrom
angt:devops-add-llama-in-all-docker-images

Conversation

@angt

@angt angt commented Jun 26, 2026

Copy link
Copy Markdown
Member

Overview

This proposal aims to simplify Docker images and prepare for a near future where only the llama binary will be provided, eliminating the need for light and server flavors

See: huggingface/hub-docs#2593

Additional information

Requirements

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
@angt
angt requested review from ggerganov and julien-c June 26, 2026 08:47
@angt
angt requested a review from ngxson as a code owner June 26, 2026 08:47
@github-actions github-actions Bot added the devops improvements to build systems and github actions label Jun 26, 2026
@CISC

CISC commented Jun 26, 2026

Copy link
Copy Markdown
Member

This proposal aims to simplify Docker images and prepare for a near future where only the llama binary will be provided, eliminating the need for light and server flavors

I don't see how that would eliminate the need for them? The point is to offer images only containing what you need.

@angt

angt commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

This proposal aims to simplify Docker images and prepare for a near future where only the llama binary will be provided, eliminating the need for light and server flavors

I don't see how that would eliminate the need for them? The point is to offer images only containing what you need.

The entrypoint would be only llama at the end, allowing users to run serve, bench, cli, etc directly.
This approach might be simpler (using a single Docker image) without having a bigger image than the server image (though I need to verify that claim haha)

@CISC

CISC commented Jun 26, 2026

Copy link
Copy Markdown
Member

The entrypoint would be only llama at the end, allowing users to run serve, bench, cli, etc directly.

Sure.

This approach might be simpler (using a single Docker image) without having a bigger image than the server image (though I need to verify that claim haha)

I don't think so. :)

@angt

angt commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

The entrypoint would be only llama at the end, allowing users to run serve, bench, cli, etc directly.

Sure.

This approach might be simpler (using a single Docker image) without having a bigger image than the server image (though I need to verify that claim haha)

I don't think so. :)

angt at angt-build in ~ on master
$ docker image inspect ghcr.io/ggml-org/llama.cpp:server --format='{{.Size}}'
845948308

angt at angt-build in ~ on master
$ docker image inspect ghcr.io/ggml-org/llama.cpp:light --format='{{.Size}}'
845964276

@angt

angt commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

We could actually make the light version lighter, but I don’t believe there is much value in it.
Having one Docker app llama reflecting the llama binary could be very convenient to me.

@pcuenca

pcuenca commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The entrypoint would be only llama at the end, allowing users to run serve, bench, cli, etc directly.

Sure.

This approach might be simpler (using a single Docker image) without having a bigger image than the server image (though I need to verify that claim haha)

I don't think so. :)

angt at angt-build in ~ on master
$ docker image inspect ghcr.io/ggml-org/llama.cpp:server --format='{{.Size}}'
845948308

angt at angt-build in ~ on master
$ docker image inspect ghcr.io/ggml-org/llama.cpp:light --format='{{.Size}}'
845964276

But the full would be larger, wouldn't it?

@angt

angt commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

But the full would be larger, wouldn't it?

Not tested, but should be same size to me :)

@CISC

CISC commented Jun 26, 2026

Copy link
Copy Markdown
Member

We could actually make the light version lighter, but I don’t believe there is much value in it. Having one Docker app llama reflecting the llama binary could be very convenient to me.

The problem is that the base image recently got ffmpeg added to it, it should probably only be in server/full. It adds massive bloat.

@pcuenca

pcuenca commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The current full is much larger (2.9 GB vs 850MB for the others):

docker image inspect ghcr.io/ggml-org/llama.cpp:full --format='{{.Size}}'
2886992965

@pcuenca pcuenca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, for the goal to standardize llama as the entry point.

@angt

angt commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

But the full would be larger, wouldn't it?

Not tested, but should be same size to me :)

I was thinking of the full llama, not the :full haha

@ngxson

This comment was marked as outdated.

@ngxson

ngxson commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Ignore my last comment, seems like python takes the most space in full image:

root@a946e755ab92:/app# du -h --max-depth=1 /usr
80M	/usr/libexec
153M	/usr/share
28M	/usr/include
8.0M	/usr/sbin
791M	/usr/lib
98M	/usr/bin
1.2G	/usr/local
4.0K	/usr/games
88K	/usr/src
2.4G	/usr
root@a946e755ab92:/app# du -h --max-depth=1 /usr/local/
36K	/usr/local/share
4.0K	/usr/local/include
4.0K	/usr/local/sbin
1.2G	/usr/local/lib
4.0K	/usr/local/etc
120K	/usr/local/bin
4.0K	/usr/local/games
4.0K	/usr/local/src
1.2G	/usr/local/
root@a946e755ab92:/app# du -h --max-depth=1 /usr/local/lib
1.2G	/usr/local/lib/python3.12
1.2G	/usr/local/lib
root@a946e755ab92:/app# du -h --max-depth=1 /usr/local/lib/python3.12/
1.2G	/usr/local/lib/python3.12/dist-packages
1.2G	/usr/local/lib/python3.12/

@CISC

CISC commented Jun 26, 2026

Copy link
Copy Markdown
Member

Edit: not sure why we have fetch-depth: 0 in docker.yml

It's probably a remnant from before adding create_tag when get-tag-name was a step in the main job.

@angt
angt merged commit 5d8ccdf into ggml-org:master Jun 26, 2026
3 checks passed
papamoose pushed a commit to papamoose/llama.cpp that referenced this pull request Jun 27, 2026
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
davanstrien added a commit to davanstrien/hub-docs that referenced this pull request Jun 29, 2026
…ama.cpp#25035)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kannon92

Copy link
Copy Markdown
Contributor

Will there be a follow up to release these images to dockerhub?

When I was writing this up, my AI / I found that some github actions work are needed to publish these images to dockerHub.

@kannon92

Copy link
Copy Markdown
Contributor

Ah nvm. I see your plan is to simplify the publishing process but including the app binary rather than a separate one.

davanstrien added a commit to huggingface/hub-docs that referenced this pull request Jun 30, 2026
* Use `llama serve` in Jobs serving guide (llama.cpp unified CLI)

Switches the llama.cpp section of the Jobs serving guide from the
standalone `llama-server` binary to the unified `llama serve` command,
per review feedback on #2554.

`llama serve` and `llama-server` are the same server (the unified
`llama` CLI, ggml-org/llama.cpp#23875). The unified binary ships in the
`full-cuda` image; the `server-cuda` image only contains
`/app/llama-server`, so the image changes too.

Tested on live Jobs (full-cuda + a10g-small): both the `-hf` and the
volume-mounted `--model` forms reached ready and returned completions
through the exposed-port proxy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Use lighter server-cuda image now that llama ships there (ggml-org/llama.cpp#25035)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
adrianhoehne pushed a commit to adrianhoehne/llama.cpp that referenced this pull request Jul 5, 2026
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants