aws-cdk-neuronx-patterns
Version:
> [!WARNING] > This library is experimental module.
46 lines (45 loc) • 1.46 kB
TypeScript
import { Size } from "aws-cdk-lib";
import * as batch from "aws-cdk-lib/aws-batch";
import * as ec2 from "aws-cdk-lib/aws-ec2";
import { Construct } from "constructs";
import { INeuronxInstanceType } from "../neuronx";
/**
* Props of NeuronxBatch.
*/
export interface NeuronxBatchProps extends batch.EcsEc2ContainerDefinitionProps {
/**
* VPC in which this will launch worker instance.
*/
readonly vpc: ec2.IVpc;
/**
* The instance type of worker instance.
*/
readonly neuronxInstanceType: INeuronxInstanceType;
/**
* The root volume of worker instance.
* @default - N bilion parameters * 5GiB EBS
*/
readonly volumeSize: Size;
/**
* Whether or not to use spot instances.
* Spot instances are less expensive EC2 instances that can be reclaimed by EC2 at any time;
* your job will be given two minutes of notice before reclamation.
*
* @default false
*/
readonly spot?: boolean;
/**
* The VPC Subnets this Compute Environment will launch instances in.
*
* @default - new subnets will be created
*/
readonly vpcSubnets?: ec2.SubnetSelection;
}
/**
* Neuronx batch construct.
*/
export declare class NeuronxBatch extends Construct {
readonly computeEnvironment: batch.ManagedEc2EcsComputeEnvironment;
readonly jobDefinition: batch.EcsJobDefinition;
constructor(scope: Construct, id: string, props: NeuronxBatchProps);
}