Skip to content

feat(llamacpp): factor build_fserve_command for reuse outside the App - #1534

Draft
mhotan wants to merge 2 commits into
mike/llamacpp-fuse-deliveryfrom
mike/llamacpp-fserve-command
Draft

feat(llamacpp): factor build_fserve_command for reuse outside the App#1534
mhotan wants to merge 2 commits into
mike/llamacpp-fuse-deliveryfrom
mike/llamacpp-fserve-command

Conversation

@mhotan

@mhotan mhotan commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Extract the llama-cpp-fserve argv builder out of LlamaCppAppEnvironment.post_init
into a public build_fserve_command(), and have the App call it. This makes the exact
command the App runs reusable for other serving shapes that are not a Flyte App --
notably a llama.cpp server running as a native sidecar in a task pod -- so both shapes
stay in lockstep instead of re-deriving the argv. Behavior for the App is unchanged
(the argv is identical); adds unit tests including an equivalence check.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Signed-off-by: Michael Hotan mike@union.ai


Stack created with GitHub Stacks CLIGive Feedback 💬

Extract the llama-cpp-fserve argv builder out of LlamaCppAppEnvironment.__post_init__
into a public build_fserve_command(), and have the App call it. This makes the exact
command the App runs reusable for other serving shapes that are not a Flyte App --
notably a llama.cpp server running as a native sidecar in a task pod -- so both shapes
stay in lockstep instead of re-deriving the argv. Behavior for the App is unchanged
(the argv is identical); adds unit tests including an equivalence check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Signed-off-by: Michael Hotan <mike@union.ai>
…ve_command

Demonstrate build_fserve_command in the shape it was factored for: a llama.cpp server
as a native sidecar in a Flyte task pod (init container, restart_policy="Always"),
with the primary container as the client -- for batch/pipeline inference against a
co-located model, vs the standalone scale-to-zero App. Self-contained (model via
--hf-repo, CPU-only, no volume); __main__ builds the llama.cpp image with flyte.build
and passes its URI since sidecar images must be string URIs. README notes the shape.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Signed-off-by: Michael Hotan <mike@union.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant