Skip to content
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

Add container orchestrator environment variable #43

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/deepgram-self-hosted/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
### Added

- Automatic model management on AWS now supports model removal. See the `engine.modelManager.models.remove` section in the `values.yaml` file for details.
- Container orchestrator environment variable added to improve support.
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth calling out the 3 supported values, since it's a small finite set and we could potentially add/change it in the future?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not necessarily intended to be change or configured - I don't think it needs to be called out.

Also, the cardinality will increase, as the Helm value will change for each version (but the prefix will stay the same).


### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ spec:
envFrom:
- secretRef:
name: {{ required "Missing Deepgram self-hosted API key - see `global.deepgramSecretRef`" .Values.global.deepgramSecretRef }}
env:
- name: DEEPGRAM_DEPLOYMENT_ORCHESTRATOR
value: helm-{{ include "deepgram-self-hosted.chart" . }}
command: [ "stem" ]
args: ["-v", "serve", "/etc/config/api.toml"]
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ spec:
envFrom:
- secretRef:
name: {{ required "Missing Deepgram self-hosted API key - see `global.deepgramSecretRef`" .Values.global.deepgramSecretRef }}
{{- if le (int .Values.engine.resources.requests.gpu) 0 }}
env:
- name: DEEPGRAM_DEPLOYMENT_ORCHESTRATOR
value: helm-{{ include "deepgram-self-hosted.chart" . }}
{{- if le (int .Values.engine.resources.requests.gpu) 0 }}
- name: NVIDIA_VISIBLE_DEVICES
value: "void"
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ spec:
envFrom:
- secretRef:
name: {{ required "Missing Deepgram self-hosted API key - see `global.deepgramSecretRef`" .Values.global.deepgramSecretRef }}
env:
- name: DEEPGRAM_DEPLOYMENT_ORCHESTRATOR
value: helm-{{ include "deepgram-self-hosted.chart" . }}
command: [ "hermes" ]
args: ["-v", "serve", "/etc/config/license-proxy.toml"]
resources:
Expand Down
3 changes: 3 additions & 0 deletions docker/docker-compose.license-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "docker-compose"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any way to make this a static variable or enum of some type, or is hard-coding the same string multiple times the best option on these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wasn't previously aware, which is why there is duplication in other places, but your question prompted me to go looking, and I found Docker Compose extension fields. Let me see if they're also compatible with Podman.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The Compose protocol is fairly limited. I was able to reduce the duplication of the API key and the common orchestrator variable. I tried to do the same for the release tag on each image, but I can edit only a subsection of a field.

It's also not supported by podman-compose right now, so can only use this for the Docker Compose templates.


# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path. It must match the path
Expand Down Expand Up @@ -50,6 +51,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "docker-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path.
Expand Down Expand Up @@ -92,6 +94,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "docker-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path. It must match the path
Expand Down
2 changes: 2 additions & 0 deletions docker/docker-compose.standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "docker-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path. It must match the path
Expand Down Expand Up @@ -46,6 +47,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "docker-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path.
Expand Down
3 changes: 3 additions & 0 deletions podman/podman-compose.license-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "podman-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path. It must match the path
Expand Down Expand Up @@ -51,6 +52,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "podman-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path.
Expand Down Expand Up @@ -93,6 +95,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "podman-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path. It must match the path
Expand Down
2 changes: 2 additions & 0 deletions podman/podman-compose.standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "podman-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path. It must match the path
Expand Down Expand Up @@ -47,6 +48,7 @@ services:
# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "podman-compose"

# The path on the left of the colon ':' should point to files/directories on the host machine.
# The path on the right of the colon ':' is an in-container path.
Expand Down
Loading