|
| 1 | +# Overview |
| 2 | + |
| 3 | +mapt offers operations to manage RHEL AI environments on Azure. RHEL AI instances are GPU-enabled machines with pre-installed RHEL AI images from the Azure Compute Gallery, suitable for AI/ML workloads. |
| 4 | + |
| 5 | +## Operations |
| 6 | + |
| 7 | +### List Versions |
| 8 | + |
| 9 | +List available RHEL AI versions for a given accelerator type: |
| 10 | + |
| 11 | +```bash |
| 12 | +mapt azure rhel-ai list-versions -h |
| 13 | +list-versions |
| 14 | + |
| 15 | +Usage: |
| 16 | + mapt azure rhel-ai list-versions [flags] |
| 17 | + |
| 18 | +Flags: |
| 19 | + --accelerator string accelerator type. Valid types: cuda and rocm (default "cuda") |
| 20 | + -h, --help help for list-versions |
| 21 | + |
| 22 | +Global Flags: |
| 23 | + --backed-url string backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket |
| 24 | + --project-name string project name to identify the instance of the stack |
| 25 | +``` |
| 26 | + |
| 27 | +#### Container |
| 28 | + |
| 29 | +```bash |
| 30 | +podman run -it --rm \ |
| 31 | + -e ARM_TENANT_ID=${ati_value} \ |
| 32 | + -e ARM_SUBSCRIPTION_ID=${asi_value} \ |
| 33 | + -e ARM_CLIENT_ID=${aci_value} \ |
| 34 | + -e ARM_CLIENT_SECRET=${acs_value} \ |
| 35 | + quay.io/redhat-developer/mapt:0.7.0-dev azure \ |
| 36 | + rhel-ai list-versions \ |
| 37 | + --accelerator cuda |
| 38 | +``` |
| 39 | + |
| 40 | +### Create |
| 41 | + |
| 42 | +This will create a RHEL AI instance according to params specified: |
| 43 | + |
| 44 | +```bash |
| 45 | +mapt azure rhel-ai create -h |
| 46 | +create |
| 47 | + |
| 48 | +Usage: |
| 49 | + mapt azure rhel-ai create [flags] |
| 50 | + |
| 51 | +Flags: |
| 52 | + --accelerator string accelerator type. Valid types: cuda and rocm (default "cuda") |
| 53 | + --conn-details-output string path to export host connection information (host, username and privateKey) |
| 54 | + --cpus int32 Number of CPUs for the cloud instance (default 8) |
| 55 | + --custom-image string custom image name (overrides version and accelerator) |
| 56 | + --disk-size int Disk size in GB |
| 57 | + --gpus int32 Number of GPUs |
| 58 | + --memory int32 Amount of RAM for the cloud instance in GiB (default 64) |
| 59 | + --spot if spot is set the spot prices across all regions will be checked and machine will be started on best spot option (price / eviction) |
| 60 | + --spot-eviction-tolerance string if spot is enabled we can define the minimum tolerance level of eviction. Allowed values are: lowest, low, medium, high or highest (default "lowest") |
| 61 | + --tags stringToString tags to add on each resource (--tags name1=value1,name2=value2) (default []) |
| 62 | + --timeout string set a timeout for the instance (e.g. 4h) |
| 63 | + --version string version for the RHELAI OS (default "3.0.0") |
| 64 | + -h, --help help for create |
| 65 | + |
| 66 | +Global Flags: |
| 67 | + --backed-url string backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket |
| 68 | + --project-name string project name to identify the instance of the stack |
| 69 | +``` |
| 70 | +
|
| 71 | +#### Outputs |
| 72 | +
|
| 73 | +It will create a RHEL AI instance and will give as result several files located at path defined by `--conn-details-output`: |
| 74 | +
|
| 75 | +* **host**: host for the instance (load balancer DNS if spot) |
| 76 | +* **username**: username to connect to the machine |
| 77 | +* **id_rsa**: private key to connect to the machine |
| 78 | +
|
| 79 | +Also, it will create a state folder holding the state for the created resources at Azure, the path for this folder is defined within `--backed-url`, the content from that folder is required with the same project name (`--project-name`) in order to destroy the resources. |
| 80 | +
|
| 81 | +#### Container |
| 82 | +
|
| 83 | +When running the container image it is required to pass the authentication information as variables, following a sample snippet on how to create an instance with default values: |
| 84 | +
|
| 85 | +```bash |
| 86 | +podman run -d --name mapt-rhelai \ |
| 87 | + -v ${PWD}:/workspace:z \ |
| 88 | + -e ARM_TENANT_ID=${ati_value} \ |
| 89 | + -e ARM_SUBSCRIPTION_ID=${asi_value} \ |
| 90 | + -e ARM_CLIENT_ID=${aci_value} \ |
| 91 | + -e ARM_CLIENT_SECRET=${acs_value} \ |
| 92 | + quay.io/redhat-developer/mapt:0.7.0-dev azure \ |
| 93 | + rhel-ai create \ |
| 94 | + --project-name mapt-rhelai \ |
| 95 | + --backed-url file:///workspace \ |
| 96 | + --conn-details-output /workspace \ |
| 97 | + --spot |
| 98 | +``` |
| 99 | +
|
| 100 | +### Destroy |
| 101 | +
|
| 102 | +```bash |
| 103 | +podman run -d --rm \ |
| 104 | + -v ${PWD}:/workspace:z \ |
| 105 | + -e ARM_TENANT_ID=${ati_value} \ |
| 106 | + -e ARM_SUBSCRIPTION_ID=${asi_value} \ |
| 107 | + -e ARM_CLIENT_ID=${aci_value} \ |
| 108 | + -e ARM_CLIENT_SECRET=${acs_value} \ |
| 109 | + quay.io/redhat-developer/mapt:0.7.0-dev azure \ |
| 110 | + rhel-ai destroy \ |
| 111 | + --project-name mapt-rhelai \ |
| 112 | + --backed-url file:///workspace |
| 113 | +``` |
0 commit comments