-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
GPU support #54
Comments
Does GPU support exist today for any of the providers (e.g. EC2, ECS)? |
This one worked for me: const version = '530';
const gpuImageBuilder = Ec2RunnerProvider.imageBuilder(this, 'GPU Image Builder');
gpuImageBuilder.addComponent(RunnerImageComponent.custom({
name: 'nvidia-drivers',
commands: [
'export DEBIAN_FRONTEND=noninteractive',
`apt-get install -y linux-modules-nvidia-${version}-aws nvidia-headless-${version}`,
`apt-get install -y nvidia-utils-${version}-server || apt-get install -y nvidia-utils-${version}`,
],
}));
new GitHubRunners(this, 'runners', {
providers: [
new Ec2RunnerProvider(this, 'EC2 Linux GPU', {
labels: ['ec2', 'linux', 'gpu'],
instanceType: ec2.InstanceType.of(ec2.InstanceClass.G4DN, ec2.InstanceSize.XLARGE),
imageBuilder: gpuImageBuilder,
}),
],
}); For Amazon Linux 2:
Or you can use a pre-configured AMI: const gpuImageBuilder = Ec2RunnerProvider.imageBuilder(this, 'GPU Image Builder', {
baseAmi: ecs.EcsOptimizedImage.amazonLinux2(ecs.AmiHardwareType.GPU).getImage(this).imageId,
os: Os.LINUX_AMAZON_2,
});
new GitHubRunners(this, 'runners', {
providers: [
new Ec2RunnerProvider(this, 'EC2 Linux GPU', {
labels: ['ec2', 'linux', 'gpu'],
instanceType: ec2.InstanceType.of(ec2.InstanceClass.G4DN, ec2.InstanceSize.XLARGE),
imageBuilder: gpuImageBuilder,
}),
],
}); Other providers require code changes or using CDK escape hatches as they will need (currently) unexposed settings. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: