IDE Engine profiles
IDE Engine profiles extend the common profile fields with storage settings. For background on how profiles work, see Engine profiles.
Profile fields
The following table lists the fields specific to IDE Engine profiles. For shared fields (CPU, GPU, memory, timeouts, and OIDC roles), see the shared profile fields table.
| Field | Required | Type | Description |
|---|---|---|---|
storage_bytes_constraint | Required | Numeric constraint | Allowed range for the persistent storage allocated to the IDE engine |
storage_class_name | Optional | String | Kubernetes storage class for the engine's volume. Empty uses the cluster's default storage class |
gpu_resource_name | Optional | String | Kubernetes resource name for GPUs, for example nvidia.com/gpu |
An engine copies storage_class_name from its profile when it's created. Changing the profile later doesn't move an existing engine to another storage class.
IDE Engine profiles and images live in the workspaces/global workspace.
Manage IDE Engine profiles with the Python client
For installation instructions, see Python client installation.
List available profiles
To list profiles assigned to you based on your OIDC roles:
import h2o_engine_manager
aiem = h2o_engine_manager.login()
profiles = aiem.ide_engine_profile_client.list_all_assigned_ide_engine_profiles(parent="workspaces/global")
for profile in profiles:
print(f"{profile.name}: {profile.display_name}")
Create a profile (administrator)
from h2o_engine_manager.clients.constraint.profile_constraint_duration import ProfileConstraintDuration
from h2o_engine_manager.clients.constraint.profile_constraint_numeric import ProfileConstraintNumeric
from h2o_engine_manager.clients.ide_engine_profile.profile import IDEEngineProfile
profile = aiem.ide_engine_profile_client.create_ide_engine_profile(
parent="workspaces/global",
ide_engine_profile=IDEEngineProfile(
display_name="Development",
cpu_constraint=ProfileConstraintNumeric(minimum="1", default="2", maximum="4"),
gpu_constraint=ProfileConstraintNumeric(minimum="0", default="0", maximum="0"),
memory_bytes_constraint=ProfileConstraintNumeric(minimum="2Gi", default="4Gi", maximum="16Gi"),
storage_bytes_constraint=ProfileConstraintNumeric(minimum="10Gi", default="20Gi", maximum="100Gi"),
max_idle_duration_constraint=ProfileConstraintDuration(minimum="30m", default="2h", maximum="8h"),
max_running_duration_constraint=ProfileConstraintDuration(minimum="1h", default="8h", maximum="24h"),
enabled=True,
assigned_oidc_roles_enabled=False,
),
ide_engine_profile_id="development",
)
IDE Engine images
An IDE Engine image is the container image the engine runs: a browser-based VS Code (code-server) with Python and the H2O clients installed. Administrators register images in workspaces/global; users pick one when they create an engine.
To list the registered images:
images = aiem.ide_engine_image_client.list_all_ide_engine_images(parent="workspaces/global")
for image in images:
print(f"{image.name}: {image.display_name} ({image.image})")
To register an image (administrator):
from h2o_engine_manager.clients.base.image_pull_policy import ImagePullPolicy
from h2o_engine_manager.clients.ide_engine_image.image import IDEEngineImage
aiem.ide_engine_image_client.create_ide_engine_image(
parent="workspaces/global",
ide_engine_image=IDEEngineImage(
display_name="VS Code 0.1.0",
image="353750902984.dkr.ecr.us-east-1.amazonaws.com/h2oai-ideengine:v0.1.0",
image_pull_policy=ImagePullPolicy.IMAGE_PULL_POLICY_IF_NOT_PRESENT,
enabled=True,
),
ide_engine_image_id="vscode-0-1-0",
)
- Submit and view feedback for this page
- Send feedback about AI Engine Manager to cloud-feedback@h2o.ai