Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ecs): add GPU support in container definition #3044

Merged
merged 16 commits into from
Aug 22, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(ecs): add GPU support in container definition
  • Loading branch information
mmcclean-aws committed Jun 24, 2019
commit 74cacf32a156d632681542c0ddf2d0747db3eea6
13 changes: 1 addition & 12 deletions packages/@aws-cdk/aws-ecs/lib/container-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,17 +476,6 @@ export interface HealthCheck {
readonly timeout?: number;
}

/**
* Type of resource requirement.
*/
export enum ResourceRequirementType {

/**
* The GPU resource requirement type.
*/
GPU = 'GPU',
}

function renderKV(env: { [key: string]: string }, keyName: string, valueName: string): any {
const ret = [];
for (const [key, value] of Object.entries(env)) {
Expand Down Expand Up @@ -528,7 +517,7 @@ function getHealthCheckCommand(hc: HealthCheck): string[] {
function renderResourceRequirements(gpuCount: number): CfnTaskDefinition.ResourceRequirementProperty[] | undefined {
if (gpuCount === 0) { return undefined; }
return [{
type: ResourceRequirementType.GPU,
type: 'GPU',
value: gpuCount.toString(),
}];
}
Expand Down