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

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