Memory Machine Cloud#
MemVerge Memory Machine Cloud (MMCloud)—available on AWS, GCP, and AliCloud—empowers users to continuously optimize cloud resources during runtime, safely execute stateful tasks on spot instances, and monitor resource usage in real time. These capabilities make it an excellent fit for long-running batch workloads.
Flyte can be integrated with MMCloud, allowing you to execute Flyte tasks using MMCloud.
Installation#
To install the plugin, run the following command:
pip install flytekitplugins-mmcloud
To get started with MMCloud, refer to the MMCloud User Guide.
Configuring the backend to get MMCloud working#
The MMCloud plugin is enabled in FlytePropeller’s configuration.
Getting Started#
This plugin allows executing PythonFunctionTask
using MMCloud without changing any function code.
@task(task_config=MMCloudConfig())
def to_str(i: int) -> str:
return str(i)
Resource (cpu and mem) requests and limits, container images, and environment variable specifications are supported.
ImageSpec may be used to define images to run tasks.
Credentials#
The following secrets are required to be defined for the agent server:
mmc_address
: MMCloud OpCenter addressmmc_username
: MMCloud OpCenter usernamemmc_password
: MMCloud OpCenter password
Defaults#
Compute resources:
If only requests are specified, there are no limits.
If only limits are specified, the requests are equal to the limits.
If neither resource requests nor limits are specified, the default requests used for job submission are
cpu="1"
andmem="1Gi"
, and there are no limits.
Agent Image#
Install flytekitplugins-mmcloud
in the agent image.
A float
binary (obtainable via the OpCenter) is required. Copy it to the agent image PATH
.
Sample Dockerfile
for building an agent image:
FROM python:3.11-slim-bookworm
WORKDIR /root
ENV PYTHONPATH /root
# flytekit will autoload the agent if package is installed.
RUN pip install flytekitplugins-mmcloud
COPY float /usr/local/bin/float
CMD pyflyte serve --port 8000