feat(llamacpp): factor build_fserve_command for reuse outside the App - #1534
Draft
mhotan wants to merge 2 commits into
Draft
feat(llamacpp): factor build_fserve_command for reuse outside the App#1534mhotan wants to merge 2 commits into
mhotan wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 CLI • Give Feedback 💬