-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance aiRunnerImage flag #3284
Enhance aiRunnerImage flag #3284
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3284 +/- ##
===================================================
- Coverage 33.69623% 33.68632% -0.00991%
===================================================
Files 141 141
Lines 37476 37490 +14
===================================================
+ Hits 12628 12629 +1
- Misses 24126 24139 +13
Partials 722 722
Continue to review full report in Codecov by Sentry.
|
cmd/livepeer/livepeer.go
Outdated
@@ -160,7 +160,7 @@ func parseLivepeerConfig() starter.LivepeerConfig { | |||
cfg.AIWorker = flag.Bool("aiWorker", *cfg.AIWorker, "Set to true to run an AI worker") | |||
cfg.AIModels = flag.String("aiModels", *cfg.AIModels, "Set models (pipeline:model_id) for AI worker to load upon initialization") | |||
cfg.AIModelsDir = flag.String("aiModelsDir", *cfg.AIModelsDir, "Set directory where AI model weights are stored") | |||
cfg.AIRunnerImage = flag.String("aiRunnerImage", *cfg.AIRunnerImage, "Set the docker image for the AI runner: Example - livepeer/ai-runner:0.0.1") | |||
cfg.AIRunnerImage = flag.String("aiRunnerImage", *cfg.AIRunnerImage, "Set the docker image for the AI runner: Example - livepeer/ai-runner:0.0.1 . You can also provide a JSON string to map specific pipeline names to custom images, allowing for pipeline-specific image overrides: Example - '{\"segment-anything-2\": \"livepeer/ai-runner:segment-anything-2-v1.0\", \"another-pipeline\": \"livepeer/ai-runner:another-pipeline-v2.0\"}'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cfg.AIRunnerImage = flag.String("aiRunnerImage", *cfg.AIRunnerImage, "Set the docker image for the AI runner: Example - livepeer/ai-runner:0.0.1 . You can also provide a JSON string to map specific pipeline names to custom images, allowing for pipeline-specific image overrides: Example - '{\"segment-anything-2\": \"livepeer/ai-runner:segment-anything-2-v1.0\", \"another-pipeline\": \"livepeer/ai-runner:another-pipeline-v2.0\"}'") | |
cfg.AIRunnerImage = flag.String("aiRunnerImage", *cfg.AIRunnerImage, `Set the docker image for the AI runner: Example - livepeer/ai-runner:0.0.1 . You can also provide a JSON string to map specific pipeline names to custom images, allowing for pipeline-specific image overrides: Example - '{"segment-anything-2": "livepeer/ai-runner:segment-anything-2-v1.0", "another-pipeline": "livepeer/ai-runner:another-pipeline-v2.0"}'`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RUFFY-369 looks good! However, maybe we can use raw string literals to cleanup the code a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rickstaa Just pushed the commit for the suggestion. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks approved!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🙏🏻.
@rickstaa @RUFFY-369 Are we waiting on anything to merge this PR? |
@ad-astra-video In my opinion, I don't think so. We can have @rickstaa 's thought if he has something in mind before this merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just a small fix otherwise i think startup will fail without the overrides flag
629570b
to
d401b46
Compare
…upporting JSON string
…des` This commit introduces deprecation logic for the `aiRunnerImage` flag, replacing it with a new `aiRunnerImageOverrides` flag. The new flag is designed to support enhanced image override functionality as implemented in the worker logic in [ai-worker PR livepeer#293](livepeer/ai-runner#293).
This commit ensures that the software functions correctly when imageOverrides is empty. It also updates the description of the `aiRunnerImageOverrides` command line flag.
d401b46
to
35c4ca9
Compare
This commit ensures that the right ai-worker version is linked.
What does this pull request do? Explain your changes. (required)
Towards closing 'livepeer/bounties/#69
This PR improves the
aiRunnerImage
flag to accept both string and JSON string inputs by adding the doc. Functionality is on theai-worker
side.Usage:
aiRunnerImage="{'segment-anything-2': 'livepeer/ai-runner:segment-anything-2-v1.0'}"
Specific updates (required)
How did you test each of these updates (required)
Test was performed by starting go-livepeer as aiWorker with
aiRunnerImage="{'segment-anything-2': 'livepeer/ai-runner:segment-anything-2-v1.0'}"
and verified launch version.Does this pull request close any open issues?
Checklist:
make
runs successfully./test.sh
passcc @rickstaa