machine
from lium.sdk import machine
Defined in lium.sdk.decorators.
def machine(
machine: str,
template_id: Optional[str] = None,
cleanup: bool = True,
requirements: Optional[Sequence[str]] = None
):
Decorator to execute a function on a remote Lium machine.
Creates a new pod, sends function source code and executes it remotely, returns the result, and optionally cleans up the pod.
Arguments:
- machine: Machine type (e.g., "1xH200", "1xA100")
- template_id: Docker template ID (optional, uses default if not specified)
- cleanup: Whether to delete the pod after execution (default: True)
- requirements: Optional iterable of pip-installable packages to install on the pod