Skip to content

Commit

Permalink
Add container orchestrator environment variable (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-g authored Sep 27, 2024
1 parent 4eead5d commit fde5906
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 16 deletions.
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.

### Changed

Expand Down
3 changes: 3 additions & 0 deletions charts/deepgram-self-hosted/templates/api/api.deployment.yaml
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
18 changes: 9 additions & 9 deletions docker/docker-compose.license-proxy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Make sure to replace placeholder paths to config files and model directories

x-env: &env
environment:
# Make sure you `export` your self-hosted API key secret in your local environment
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "docker-compose"

services:
# The speech API service.
api:
Expand All @@ -11,9 +17,7 @@ services:
ports:
- "8080:8080"

# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
<<: *env

# 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,9 +51,7 @@ services:
ports:
- "9991:9991"

# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
<<: *env

# 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 @@ -89,9 +91,7 @@ services:
ports:
- "8089:8080"

# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
<<: *env

# 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
14 changes: 8 additions & 6 deletions docker/docker-compose.standard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Make sure to replace placeholder paths to config files and model directories

x-env: &env
environment:
# Make sure you `export` your self-hosted API key secret in your local environment
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
DEEPGRAM_DEPLOYMENT_ORCHESTRATOR: "docker-compose"

services:
# The speech API service.
api:
Expand All @@ -11,9 +17,7 @@ services:
ports:
- "8080:8080"

# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
<<: *env

# 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 @@ -43,9 +47,7 @@ services:
ports:
- "9991:9991"

# Make sure you `export` your self-hosted API key secret in your local environment
environment:
DEEPGRAM_API_KEY: "${DEEPGRAM_API_KEY}"
<<: *env

# 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

0 comments on commit fde5906

Please sign in to comment.