[PATCH v2 10/10] terraform: enable Lambda Labs cloud provider in menus
Luis Chamberlain <[email protected]>
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
Enable Lambda Labs as a selectable cloud provider and add example configurations to help users get started quickly. Lambda Labs is now fully integrated and available for use. This patch: - Adds Lambda Labs to the cloud provider selection menu - Sources Lambda Labs Kconfig when selected - Provides example defconfigs for common GPU configurations - Includes smart selection and cost-optimized examples - Adds shared SSH key configuration example Example configurations provided: - lambdalabs: Basic Lambda Labs setup - lambdalabs-gpu-1x-a10: Single A10 GPU instance - lambdalabs-gpu-1x-a100: Single A100 GPU instance - lambdalabs-gpu-1x-h100: Single H100 GPU instance - lambdalabs-gpu-8x-a100: 8x A100 GPU cluster - lambdalabs-gpu-8x-h100: 8x H100 GPU cluster - lambdalabs-smart: Smart instance selection - lambdalabs-shared-key: Shared SSH key setup Lambda Labs is now ready for GPU-accelerated workloads with dynamic configuration based on real-time API data. Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]> --- defconfigs/lambdalabs | 15 +++++++++++++++ defconfigs/lambdalabs-gpu-1x-a10 | 9 +++++++++ defconfigs/lambdalabs-gpu-1x-a100 | 8 ++++++++ defconfigs/lambdalabs-gpu-1x-h100 | 8 ++++++++ defconfigs/lambdalabs-gpu-8x-a100 | 8 ++++++++ defconfigs/lambdalabs-gpu-8x-h100 | 8 ++++++++ defconfigs/lambdalabs-shared-key | 11 +++++++++++ defconfigs/lambdalabs-smart | 10 ++++++++++ terraform/Kconfig.providers | 10 ++++++++++ 9 files changed, 87 insertions(+) create mode 100644 defconfigs/lambdalabs create mode 100644 defconfigs/lambdalabs-gpu-1x-a10 create mode 100644 defconfigs/lambdalabs-gpu-1x-a100 create mode 100644 defconfigs/lambdalabs-gpu-1x-h100 create mode 100644 defconfigs/lambdalabs-gpu-8x-a100 create mode 100644 defconfigs/lambdalabs-gpu-8x-h100 create mode 100644 defconfigs/lambdalabs-shared-key create mode 100644 defconfigs/lambdalabs-smart diff --git a/defconfigs/lambdalabs b/defconfigs/lambdalabs new file mode 100644 index 0000000..3314954 --- /dev/null +++ b/defconfigs/lambdalabs @@ -0,0 +1,15 @@ +# Lambda Labs default configuration with smart cheapest instance selection +# Automatically: +# 1. Detects your location from public IP +# 2. Finds the cheapest available GPU instance +# 3. Selects the closest region where it's available +# 4. Creates unique SSH key per project directory for security +# 5. Auto-uploads SSH key to Lambda Labs on first run +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_SMART_CHEAPEST=y +CONFIG_TERRAFORM_LAMBDALABS_SSH_KEY_UNIQUE=y +CONFIG_TERRAFORM_LAMBDALABS_SSH_KEY_AUTO_CREATE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/defconfigs/lambdalabs-gpu-1x-a10 b/defconfigs/lambdalabs-gpu-1x-a10 new file mode 100644 index 0000000..7a2b4f5 --- /dev/null +++ b/defconfigs/lambdalabs-gpu-1x-a10 @@ -0,0 +1,9 @@ +# Lambda Labs GPU 1x A10 instance - budget-friendly option ($0.75/hr) +# Automatically selects the best available region +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y +CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_A10=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/defconfigs/lambdalabs-gpu-1x-a100 b/defconfigs/lambdalabs-gpu-1x-a100 new file mode 100644 index 0000000..961b9a2 --- /dev/null +++ b/defconfigs/lambdalabs-gpu-1x-a100 @@ -0,0 +1,8 @@ +# Lambda Labs GPU 1x A100 instance - high performance single GPU +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y +CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_A100_SXM4=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/defconfigs/lambdalabs-gpu-1x-h100 b/defconfigs/lambdalabs-gpu-1x-h100 new file mode 100644 index 0000000..7ee1568 --- /dev/null +++ b/defconfigs/lambdalabs-gpu-1x-h100 @@ -0,0 +1,8 @@ +# Lambda Labs GPU 1x H100 instance - latest generation single GPU +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y +CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_H100_SXM5=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/defconfigs/lambdalabs-gpu-8x-a100 b/defconfigs/lambdalabs-gpu-8x-a100 new file mode 100644 index 0000000..81bd6c0 --- /dev/null +++ b/defconfigs/lambdalabs-gpu-8x-a100 @@ -0,0 +1,8 @@ +# Lambda Labs GPU 8x A100 instance - multi-GPU compute cluster +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y +CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_8X_A100=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/defconfigs/lambdalabs-gpu-8x-h100 b/defconfigs/lambdalabs-gpu-8x-h100 new file mode 100644 index 0000000..cd4f895 --- /dev/null +++ b/defconfigs/lambdalabs-gpu-8x-h100 @@ -0,0 +1,8 @@ +# Lambda Labs GPU 8x H100 instance - top-tier multi-GPU cluster +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y +CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_8X_H100_SXM5=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/defconfigs/lambdalabs-shared-key b/defconfigs/lambdalabs-shared-key new file mode 100644 index 0000000..a7c0ac7 --- /dev/null +++ b/defconfigs/lambdalabs-shared-key @@ -0,0 +1,11 @@ +# Lambda Labs configuration with shared SSH key (legacy mode) +# Uses a single SSH key name across all projects +# Less secure but simpler for testing +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_SMART_CHEAPEST=y +CONFIG_TERRAFORM_LAMBDALABS_SSH_KEY_SHARED=y +# Manual key name can be set via menuconfig +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/defconfigs/lambdalabs-smart b/defconfigs/lambdalabs-smart new file mode 100644 index 0000000..9c8721e --- /dev/null +++ b/defconfigs/lambdalabs-smart @@ -0,0 +1,10 @@ +# Lambda Labs with smart defaults - cheapest instance and best region +# Automatically selects the cheapest available instance type +# Automatically selects the best available region for that instance +CONFIG_TERRAFORM=y +CONFIG_TERRAFORM_LAMBDALABS=y +CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y +CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_A10=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y +CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y diff --git a/terraform/Kconfig.providers b/terraform/Kconfig.providers index abe9151..944abb9 100644 --- a/terraform/Kconfig.providers +++ b/terraform/Kconfig.providers @@ -1,5 +1,6 @@ choice prompt "Choose your cloud provider" + default TERRAFORM_LAMBDALABS if CLOUD_INITIALIZED default TERRAFORM_AWS config TERRAFORM_GCE @@ -36,6 +37,14 @@ config TERRAFORM_OPENSTACK Enabling this means you are going to use OpenStack for your cloud solution. +config TERRAFORM_LAMBDALABS + bool "Lambda Labs" + depends on TARGET_ARCH_X86_64 + help + Enabling this means you are going to use Lambda Labs for your cloud + solution. Lambda Labs provides GPU-accelerated instances optimized + for machine learning and high-performance computing workloads. + endchoice source "terraform/gce/Kconfig" @@ -43,3 +52,4 @@ source "terraform/aws/Kconfig" source "terraform/azure/Kconfig" source "terraform/oci/Kconfig" source "terraform/openstack/Kconfig" +source "terraform/lambdalabs/Kconfig" -- 2.50.1