-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-codebuild: using SMALL compute type with GPU codebuild environment #25857
Comments
Thanks for submitting this, and for sharing where in the codebase we're checking for this, it should be a pretty easy fix! We accept contributions 🙂 |
Thanks for the quick triaging. I can likely take a stab at this by the end of this month, and potentially sooner. I will comment when I begin if I have some more time. To any potential contributors, please feel free to start this if I haven't commented anything over the coming weeks. If anyone else wants to look in the meantime I think the Arm build image has almost copy/pastable code since ARM supports both SMALL and LARGE: |
…pute type with Linux GPU build image (#25880) This fix allows specifying the `BUILD_GENERAL1_SMALL` compute type when using a Linux GPU to build an image as defined in the [docs](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html). Closes #25857. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the bug
It seems like AWS CodeBuild recently added support for SMALL compute type with GPU compute environments (blog post from Mar 17, 2023). CDK CodeBuild seems to have a now-outdated check to ensure only LARGE compute type can be used with GPU instances https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-codebuild/lib/linux-gpu-build-image.ts#L146
which leads to an error if the small GPU codebuild is used:
For more context on the small GPU compute type support:
Expected Behavior
CDK users should be allowed to select compute type for
BUILD_GENERAL1_SMALL
along with a GPU environment now that codebuild does support it.Current Behavior
An exception is raised:
RuntimeError: Invalid CodeBuild environment: GPU images only support ComputeType 'BUILD_GENERAL1_LARGE' - 'BUILD_GENERAL1_SMALL' was given
It looks like this error comes from CDK code https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-codebuild/lib/linux-gpu-build-image.ts#L146
Reproduction Steps
Then I run
cdk synth BadBuildEnvironment
and see:Possible Solution
Update the validation to allow for SMALL type since it's now supported on the codebuild side.
Additional Information/Context
No response
CDK CLI Version
2.77.0 (build 06a0b19)
Framework Version
No response
Node.js Version
v20.0.0
OS
Linux HEUWL07705 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: