Deploying MaxAI STO Model
This section provides detailed instructions on how to deploy MaxAI's STO model in the AWS.
Create Amazon EFS Access Points for AION STO
To create EFS Access Point for AION STO, follow the steps below:
- Log in to the AWS Management Console.
- Navigate to EFS via the search bar.
- Select Access Points from the left navigation menu.
- Click Create Access Point.
- Provide the following details:
Field Value File system Use the default or an existing one Name (optional) cdp-aion-sto Root directory path /app/AION/model/sto User ID 0 Group ID 0 Secondary group IDs Leave blank Owner User ID 0 Owner Group ID 0 Access point permissions 0775 - Click Create Access Point.
Deploy STO Model via Devtron
To deploy the STO model, follow the steps below:
- Step 1: Access Devtron
- Open Devtron dashboard, and navigate to the Chart Store and select Generic Helm Chart.
- Step 2: Configure and Deploy
- Click Configure & Deploy.
- Under the Configuration section, paste and modify the following YAML template according to your environment.
- STO Helm Configuration Template is provided
below.
data: - apiVersion: v1 kind: PersistentVolume metadata: name: aion-sto-pv spec: capacity: storage: 50Gi accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain storageClassName: efs-sc csi: driver: efs.csi.aws.com volumeHandle: <AWS Access Point Id>::<AWS File System ID> - apiVersion: v1 kind: PersistentVolumeClaim metadata: name: aion-sto-pvc spec: accessModes: - ReadWriteMany resources: requests: storage: 50Gi storageClassName: efs-sc - apiVersion: apps/v1 kind: Deployment metadata: name: cdp-sto-deployment data: config.ini: | [AUTH] client_id=test client_secret=test spec: replicas: 1 selector: matchLabels: app: cdp-sto template: metadata: labels: app: cdp-sto spec: containers: - name: cdp-sto-container Image: { provide image repository: image tag} imagePullPolicy: Always ports: - containerPort: 8000 volumeMounts: - mountPath: /app/AION/config name: aion-recom-volume - mountPath: /app/AION/model name: aion-pvc-volume volumes: - name: aion-recom-volume configMap: name: aion-config - name: aion-pvc-volume persistentVolumeClaim: claimName: aion-sto-pvc - apiVersion: v1 kind: Service metadata: name: cdp-sto-service spec: ports: - name: http port: 8000 protocol: TCP targetPort: 8000 selector: app: cdp-sto - apiVersion: networking.k8s.io/v1 kind: Ingress metadata: Annotations: {Add annotation related to environment} labels: app.kubernetes.io/instance: cdp-sto name: cdp-sto spec: ingressClassName: alb rules: - host: <HOST_DETAILS> http: paths: - backend: service: name: cdp-sto-service port: number: 8000 path: /* pathType: ImplementationSpecific - apiVersion: keda.sh/v1alpha1 kind: ScaledObject metadata: name: cdp-sto-scaledobject namespace: default spec: scaleTargetRef: name: cdp-sto-deployment pollingInterval: 30 cooldownPeriod: 300 enabled: true minReplicaCount: 1 maxReplicaCount: 5 idleReplicaCount: 0 restoreToOriginalReplicaCount: true advanced: horizontalPodAutoscalerConfig: behavior: scaleDown: stabilizationWindowSeconds: 300 policies: - type: Percent value: 100 periodSeconds: 60 triggers: - type: prometheus metadata: serverAddress: <PROMETHEUS_SERVER_URL> metricName: cpuusage query: sum(rate(container_cpu_usage_seconds_total{pod=~"cdp-sto.*",container_name!="POD"}[5m]))*100 threshold: "80" - type: prometheus metadata: serverAddress: <PROMETHEUS_SERVER_URL> metricName: memoryusage query: avg(container_memory_usage_bytes{pod=~"cdp-sto.*"}) / sum(kube_pod_container_resource_limits{pod=~"cdp-sto.*",resource="memory"}) * 100 threshold: "80"Note: Replace placeholders such as <IMAGE_REPOSITORY>, <IMAGE_TAG>, <AWS_ACCESS_POINT_ID>, <HOST_DETAILS>, <PROMETHEUS_SERVER_URL> and <EFS_FILE_SYSTEM_ID> with your actual values.
Post-Deployment Verification
- Go to the Devtron dashboard, and navigate to the Applications section.
- Ensure the cdp-sto container is in the Running state.
- Check logs to verify successful startup and readiness.