Skip to content

Checks

checks

Defines functions that check whether or not mirumoji's required python / system dependencies are available in the end-user's machine

Contains functions that check for the presence of executables with shutil and run system commands using subprocess to inspect external dependecies

Each probe function inspects one external dependency and returns a CheckResult rather than raising so that a frontend (CLI / GUI) can present a full report

docker()

Checks whether the Docker Daemon is installed and running

Returns:

Type Description
CheckResult

The Docker check result

docker_compose()

Checks whether the Docker Compose v2 plugin is available

Returns:

Type Description
CheckResult

The Docker Compose check result

flet()

Checks whether the flet GUI dependency is installed

Returns:

Type Description
CheckResult

The Flet check result

flutter()

Checks whether the Flutter SDK is installed (needed to build the GUI)

Returns:

Type Description
CheckResult

The Flutter check result

git()

Checks whether git is installed

Returns:

Type Description
CheckResult

The git check result

nvidia_gpu()

Checks whether an NVIDIA GPU is visible via nvidia-smi

Returns:

Type Description
CheckResult

The NVIDIA GPU check result (skipped on macOS)

nvidia_toolkit()

Checks whether the NVIDIA Container Toolkit can expose a GPU to Docker

Runs a short-lived CUDA container with --gpus all. Requires both a GPU and a running Docker Daemon

No Side Effects

The probe image is removed afterwards unless it was already present locally before the check, so the check leaves Docker as it found it

Returns:

Type Description
CheckResult

The NVIDIA Container Toolkit check result

require_docker()

Ensures that a Docker Daemon is running

Raises when an action cannot proceed without a running Docker Daemon

Raises:

Type Description
DependencyError

If Docker is not installed or not running

require_published_version(version)

Raises when a pinned version has no published Mirumoji images

Skips the installed package version, which a release always publishes, so only an explicitly pinned custom version pays the Docker Hub round-trip

Parameters:

Name Type Description Default
version str

The resolved image version

required

Raises:

Type Description
DependencyError

If the version has no published images, or Docker Hub could not be reached

validate_deploy(backend, source)

Runs all external dependency checks relevant to a specific deploy configuration

Required For All Deploys
  • Docker

  • Compose

Required When Building Images Locally
  • Docker

  • Compose

  • Git

Required For The LOCAL Backend
  • NVIDIA GPU

  • NVIDIA Container Toolkit

Parameters:

Name Type Description Default
backend Backend

The chosen transcription backend

required
source ImageSource

Whether images are pulled or built locally

required

Returns:

Type Description
list[CheckResult]

The ordered list of check results

version_published(version, *, timeout=10.0)

Reports whether the published Mirumoji images exist for a version

Queries the Docker Hub tags API for frontend-{version}. Every image (frontend, backend, offload) is published together per release, so the frontend tag is a reliable proxy for the whole set

Parameters:

Name Type Description Default
version str

The image version to check

required
timeout float

The request timeout in seconds

10.0

Returns:

Type Description
bool

True when the tag exists, False on a 404

Raises:

Type Description
DependencyError

If Docker Hub could not be reached