Skip to content

feat: modernize build system with GPU/TPM support and refactor configuration management #19

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

PeterFarber
Copy link
Collaborator

Overview

This PR modernizes the HyperBEAM OS build system by adding hardware passthrough capabilities, implementing a dataclass-based configuration system, and updating the SNP build pipeline.

New Features

  • GPU Passthrough: Full NVIDIA GPU passthrough with VFIO-PCI setup and driver installation
  • TPM Support: Hardware TPM passthrough with ownership clearing and configuration management
  • Modern SNP Build: Replace legacy AMDSEV build with Python-based component system using GitHub releases

Configuration Improvements

  • Migrate to type-safe dataclass configuration with dependency injection
  • Consolidate GPU settings from VMConfig to BuildConfig for better organization
  • Standardize parameter naming across scripts (USE_GPU → ENABLE_GPU)
  • Remove deprecated SNP properties and hardcoded URLs

Build System Enhancements

  • Multi-stage Docker builds for CPU/GPU initramfs variants
  • Automatic GPU setup during initialization when enabled
  • Enhanced launch script with hardware detection and configuration
  • Updated VM defaults: Genoa CPU, optimized vCPU/memory settings

This refactoring improves maintainability, adds essential hardware support, and modernizes the overall build pipeline.

- Add GPU passthrough with NVIDIA driver installation and VFIO-PCI setup
- Implement TPM passthrough with hardware device support and ownership clearing
- Replace legacy AMDSEV build with modern Python-based SNP component system
- Update VM config: Genoa CPU, reduced vCPU/memory defaults, GPU toggle
- Add multi-stage Docker builds for CPU/GPU initramfs variants
- Enhance launch script with GPU detection and TPM configuration
- Create dedicated GPU setup script and base_setup improvements
- Update dependencies to include TPM tools and remove old parameters
- Move GPU settings from VMConfig to BuildConfig
- Rename gpu property to enable_gpu for consistency
- Update SNP to use GitHub releases instead of Arweave
- Standardize GPU parameter naming (USE_GPU -> ENABLE_GPU)
- Add automatic GPU setup during initialization
- Remove deprecated SNP properties
@PeterFarber PeterFarber force-pushed the feat/refactor-snp_builder branch from 4ced8e0 to b8f2cbf Compare August 7, 2025 16:22
- Add SKIP_HYPERBEAM build argument to content.Dockerfile
- Conditionally skip git clone, compilation, and file copying when debug=true
- Update build_guest_content() to pass debug flag as Docker build argument
- Skip HyperBEAM component copying in setup_guest.py when in debug mode
- Remove commented AO/CU build code from Dockerfile
- Consolidate HyperBEAM build logic into single conditional block

This allows faster iteration during development by bypassing the time-consuming
HyperBEAM build process when testing other parts of the system. Debug mode is
controlled via config.build.debug setting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant