Skip to content

Add Nvidia GPU TEE Support #14

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 9 commits into
base: main
Choose a base branch
from
Open

Conversation

jax-cn
Copy link

@jax-cn jax-cn commented Jun 26, 2025

No description provided.

- Introduced a new setup_gpu function to configure GPU CC for the host system.
- Added command to download GPU admin tools from the NVIDIA repository during initialization.
- Updated main function to include the new setup_gpu command.
- Updated setup_gpu function to include GPU passthrough configuration.
- Added a new script, gpu_passthrough.sh, to manage NVIDIA GPU passthrough for virtual machines.
- Implemented functions for detecting GPUs, enabling VFIO-PCI, and configuring passthrough.
- Created nvidia-lkca.conf to manage NVIDIA module loading with ecdsa_generic and ecdh.
- Ensured proper permissions for the configuration file.
- Updated VCPU count limit from 255 to 32 in launch.sh.
- Modified UEFI drive options for improved compatibility.
- Added GPU passthrough parameters to support NVIDIA GPUs in launch.sh.
- Adjusted memory configuration in config.py from 204800 to 32768.
- Enhanced base_setup.sh to install NVIDIA drivers and CUDA toolkit.
- Increased tmpfs sizes for /var and /tmp in init.sh for better resource management.
launch.sh Outdated
@@ -386,7 +393,7 @@ else
fi

# add number of VCPUs
[ -n "${SMP}" ] && add_opts "-smp ${SMP},maxcpus=255"
[ -n "${SMP}" ] && add_opts "-smp ${SMP},maxcpus=32"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this nessasary?

run Outdated
@@ -61,13 +61,15 @@ def init():

# Download and extract SNP release tarball.
tarball = os.path.join(config.dir.build, "snp-release.tar.gz")
url = "https://github.com/SNPGuard/snp-guard/releases/download/v0.1.2/snp-release.tar.gz"
url = "https://github.com/apuslabs/snp-guard/releases/download/v6.9.0/snp-release.tar.gz"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will upload release to ardrive and fork this repo to permaweb.
Then use the arweave tx to download

run Outdated
with requests.get(url, stream=True) as r:
r.raise_for_status()
with open(tarball, "wb") as f:
shutil.copyfileobj(r.raw, f)
run_command(f"tar -xf {tarball} -C {config.dir.build}")
run_command(f"rm {tarball}")
# Download the GPU admin tools
run_command(f"cd {config.dir.build} && git clone https://github.com/nvidia/gpu-admin-tools && cd .. ")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will work the gpu-admin-tools to permaweb.
Then replace this with the forked repo.

export NEEDRESTART_MODE=a

echo "Installing NVIDIA CUDA repository..."
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Download this and upload to ardrive and use an arweave tx id to download.

- Update HyperBEAM branch from main to edge
- Use dynamic SMP value for QEMU maxcpus instead of hardcoded 32
- Replace GitHub/NVIDIA URLs with Arweave for SNP release and CUDA keyring
- Switch gpu-admin-tools repository from nvidia to permaweb
- Add GPU setup integration to base image build process
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.

3 participants