From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 468B530C635 for ; Wed, 27 Aug 2025 21:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756330146; cv=none; b=AbOBtO3Sp0Ho/9rXf9/Duh3m93nLkOTmvuRKoUDG3HASGMEj88Gr+TvVdO/6UYKSXro+iVsfb/YU3K80BITZz0fn9zxxBNH6dspEYrRjxTKVKyLJQOxqXRMXB4WpKdsjNTAxirbeyxuUreqjR+zXEyxk/TYENsS+89ifGwkkylo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756330146; c=relaxed/simple; bh=Wbna4YaSxtS0a++m0iSLa3TlPbnW4z5KQXZl99gJBs0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZrAfHaS/sC2crr97nbrAxjEE+k2kK81/G8MAIa7paRCyBoth/qGOgIWh1gy5Ch2xe2zNUKzSqi/DCM259II57+ASTuuri53bjMh4tii96AWa1Slfb1a2O7T0ACYl9SgiiaEtM5rpZAvkJPBMO/6P7v9BRGqkeXOfmg87OEGaiUM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=lyXVOOpA; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="lyXVOOpA" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=PR0Zaeqbwq/SYcfvfBOM3rRVaOp6FEein2JaAzdEgYE=; b=lyXVOOpArSSYCEBmOeu96O0RG6 to5wO6ThrpMUYQ5ZptdKXGilu514iEXGtoQeTcRrKCKhgOOMV1tu8ylcdW2b0eskok0aj885Q/qMq XT1swU/bOXTio6BcVu5vw6K0cYWzz5C9gU+A5C+roSdAf49p8vkIOPDpIu8z6hS0z/3SnwKz1CNPf pU5uxmZAlVlOfak7kcvarOXzt6T0eicOZna9QMpNPzBPYOLtJclM2gewdboIMBpncsQaLToZZIsl6 Ur9jgTPJbmm8NgJfgUFwbvRE/eCx66GMAPrq4x/t2DvwcKal0LQjp9eXA/8I2hLboJrXZXYABqfJm R9uRBLOw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1urNhY-0000000GsK6-2ei4; Wed, 27 Aug 2025 21:29:04 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH v2 10/10] terraform: enable Lambda Labs cloud provider in menus Date: Wed, 27 Aug 2025 14:29:01 -0700 Message-ID: <20250827212902.4021990-11-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250827212902.4021990-1-mcgrof@kernel.org> References: <20250827212902.4021990-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain 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 --- 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