Constants
constants
¶
Defines deterministic constants used by the launcher
Deterministic Data
- Source Repository URL
- Docker Image References
- Docker Compose Identifiers
- Environment Variables Used By The Server
ADVANCED_VARS = (EnvVar('MIRUMOJI_LOGGING_LEVEL', description='The Python Logging Level For The Mirumoji Backend Server'), EnvVar('MIRUMOJI_MODAL_IMAGE', description='Docker Hub Image That Modal Containers Will Run'), EnvVar('MIRUMOJI_SRT_DEFAULT_SYS_MSG', description="The Default LLM System Message Used For SRT Fixing When A Profile Doesn't Have An LLM Template Configured"), EnvVar('MIRUMOJI_BREAKDOWN_DEFAULT_SYS_MSG', description="The Default LLM System Message Used For Word Breakdowns When A Profile Doesn't Have An LLM Template Configured"))
module-attribute
¶
Additional environment variables accepted by the mirumoji backend that are
not required, but may be used for advanced configuration. All of these have
sensible defaults and don't require custom values in most cases
BACKEND_CONTEXT = 'apps/mirumoji'
module-attribute
¶
Path determining the location relative to the mirumoji repo's root from
which Docker should build the backend Image
BACKEND_CPU_DOCKERFILE = 'apps/mirumoji/src/mirumoji/docker/Dockerfile.local.cpu'
module-attribute
¶
Path to the backend Docker Image's Dockerfile relative to the mirumoji
repo root when using the modal transcription backend
BACKEND_CPU_IMAGE = 'svdc1/mirumoji:backend-cpu-latest'
module-attribute
¶
Docker Hub Identifier of the latest Mirumoji backend image for the modal
transcription backend
BACKEND_CPU_LOCAL_IMAGE = 'mirumoji_backend_cpu_local:latest'
module-attribute
¶
Local Docker Image Identifier to attach to a locally built Mirumoji backend
image for the modal transcription backend
BACKEND_GPU_DOCKERFILE = 'apps/mirumoji/src/mirumoji/docker/Dockerfile.local.gpu'
module-attribute
¶
Path to the backend Docker Image's Dockerfile relative to the mirumoji
repo root when using the local transcription backend
BACKEND_GPU_IMAGE = 'svdc1/mirumoji:backend-gpu-latest'
module-attribute
¶
Docker Hub Identifier of the latest Mirumoji backend image for the local
transcription backend
BACKEND_GPU_LOCAL_IMAGE = 'mirumoji_backend_gpu_local:latest'
module-attribute
¶
Local Docker Image Identifier to attach to a locally built Mirumoji backend
image for the local transcription backend
BACKEND_SERVICE = 'backend'
module-attribute
¶
Identifier for the backend service in the Mirumoji Docker Compose application
CONFIG_ENV_VARS = (*LLM_VARS, *MODAL_VARS, *ADVANCED_VARS)
module-attribute
¶
Every user-facing environment variable that the launcher manages in the config file (LLM Providers + Modal + Advanced Overrides)
CONFIG_KEYS = frozenset([(v.name) for v in CONFIG_ENV_VARS] + list(_DEPLOYMENT_CHOICES))
module-attribute
¶
Every environment variable key that the launcher accepts in the managed config
file. Used to reject unknown keys in mirumoji config set/delete
DEFAULT_BRANCH = 'main'
module-attribute
¶
Which branch of the Mirumoji GitHub repo to use to build images
FRONTEND_CONTEXT = 'apps/frontend'
module-attribute
¶
Path determining the location relative to the mirumoji repo's root from
which Docker should build the frontend Image
FRONTEND_DOCKERFILE = 'apps/frontend/Dockerfile'
module-attribute
¶
Path to the fontend Docker Image's Dockerfile relative to the mirumoji
repo root
FRONTEND_IMAGE = 'svdc1/mirumoji:frontend-latest'
module-attribute
¶
Docker Hub Identifier of the latest Mirumoji frontend image
FRONTEND_LOCAL_IMAGE = 'mirumoji_frontend_local:latest'
module-attribute
¶
Local Docker Image Identifier to attach to a locally built Mirumoji frontend
image
FRONTEND_SERVICE = 'frontend'
module-attribute
¶
Identifier for the frotend service in the Mirumoji Docker Compose application
HOST_LAN_IP_VAR = 'HOST_LAN_IP'
module-attribute
¶
Stores the end-user's IPv4 LAN IP, discovered automatically with the socket
library
IMAGE_SOURCE_VAR = 'MIRUMOJI_IMAGE_SOURCE'
module-attribute
¶
Persists the launcher's image-source choice (pull pre-built vs build locally) in the managed config file so that it's remembered across runs
Launcher-Only. The compose template never references it, and the server ignores it
LLM_VARS = (EnvVar('OPENAI_API_KEY', secret=True, description='Make GPT Available For LLM Features'), EnvVar('ANTHROPIC_API_KEY', secret=True, description='Make Claude Available For LLM Features'), EnvVar('GEMINI_API_KEY', secret=True, description='Make Gemini Available For LLM Features'), EnvVar('MIRUMOJI_LLM_API_KEY', secret=True, description='Use A Custom OpenAI-Compatible Endpoint For LLM Features (Leave Empty If Not Applicable)'), EnvVar('MIRUMOJI_LLM_BASE_URL', description='Use A Custom OpenAI-Compatible Endpoint For LLM Features'))
module-attribute
¶
Optional LLM Provider Keys
The frontend gates the use of LLM capabilities when none of these are configured
MODAL_VARS = (EnvVar('MODAL_TOKEN_ID', required=True, secret=True, description='Modal Token ID (Required For The Modal Backend)'), EnvVar('MODAL_TOKEN_SECRET', required=True, secret=True, description='Modal Token Secret (Required For The Modal Backend)'), EnvVar('MIRUMOJI_MODAL_GPU', description='Which GPU To Use In The Modal Containers', default='A10G'), EnvVar('MODAL_FORCE_BUILD', description='Forces Modal Containers To Update The Cached Mirumoji App Image', default='0'))
module-attribute
¶
Modal Credentials + Configuration Environment Variables (Required Only For The Modal Transcription Backend)
PROJECT_NAME = 'mirumoji'
module-attribute
¶
Name of the Docker Compose project
REPO_URL = 'https://github.com/svdC1/mirumoji.git'
module-attribute
¶
The Mirumoji GitHub repository URL
TRANSCRIBE_BACKEND_VAR = 'MIRUMOJI_TRANSCRIBE_BACKEND'
module-attribute
¶
Stores a Backend value to be passed to the mirumoji server on
application startup
backend_vars(backend)
¶
Returns all relevant environment variables for a given transcription
backend
MODAL Backend
- All Modal-Related Variables
- All LLM Provider API Keys
- All Advanced Variables
LOCAL Backend
- All LLM Provider API Keys
- All Advanced Variables
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend
|
Backend
|
The chosen transcription backend |
required |
Returns:
| Type | Description |
|---|---|
EnvVar
|
The ordered env vars that may be passed when the transcription backend |
...
|
choice is |
deployment_choices(key)
¶
Returns the allowed values for a deployment key, or None for free-form
keys
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
The environment variable key |
required |
Returns:
| Type | Description |
|---|---|
tuple[str, ...] | None
|
The permitted enum values for |
tuple[str, ...] | None
|
|