Repository navigation
feat(workspaces): turn the workspace gateway's Audio API on - #1821
Merged
Merged
Conversation
Contributor
|
🎉 This PR is included in version 0.259.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
A session on a Kubernetes workspace calls the Gateway the CLI deploys for it, and that Gateway ran without its Audio API:
/v1/audio/speechanswered 404, soTextToSpeech,TextToMusicandTextToSFXfailed from a workspace.The Gateway now gets
spec.audio.enabledwhen a workspace that calls it turns on one of those tools in itsenv(INFER_TEXT_TO_SPEECH_ENABLED,INFER_TEXT_TO_MUSIC_ENABLED,INFER_TEXT_TO_SFX_ENABLED). That is the rule the CLI already applies to the gateway it starts itself, so there is no new setting. Workspaces on one cluster share its Gateway, so the answer is derived once for all of them - otherwise each teleport would flip it and roll the pods.With audio on, the Gateway also gets a 16Gi memory limit. Measured on a pod of the current gateway image with the operator's default 2 CPU limit: one sentence took 20 s, two at once took 60 s each and held 11.5 GiB. At a 4Gi limit the pod was OOM-killed on the first sentence.
Needs
inference-gateway/operatorwithspec.audio(operator PR 343). Checked against a cluster on operator v0.36.0: the field is dropped with a warning and the rest of the spec applies, so an older operator keeps working with audio off. Not checked: a full teleport against an operator that has the field.Changes
config/compute.go-ResolveComputederivesWorkspaceEntry.GatewayAudiofrom every workspace that shares the gateway.config/daemon.go- the derived field, never written todaemon.yaml.internal/agent/infrastructure/kubernetes/gateway.go-gatewaySpecwritesaudioand the memory limit.docs/daemon.md- what turns it on, the operator it needs, and that the models are downloaded again after the Gateway had no pod.