AWS Air-gapped GPU: Create an Image
Create an Image using Konvoy Image Builder (KIB) for use in an air-gapped cluster
Prerequisites
Before you begin, you must:
Check the DKP Supported Kubernetes Versions.
Download the KIB bundle for your version of DKP prefixed with
konvoy-image-bundle
for your OS.Create a working Docker or other registry setup.
Ensure you have met the minimal set of permissions from the AWS Image Builder Book.
A Minimal IAM Permissions for KIB to create an Image for an AWS account using Konvoy Image Builder.
The default AWS image is not recommended for use in production. We suggest using Konvoy Image Builder to create an AWS Air-gapped AMI to take advantage of enhanced cluster operations. Explore the KIB with AWS topics for more options.
Using KIB, you can build an AMI without requiring access to the internet by providing an additional --override
flag.
Assuming you have downloaded
dkp-air-gapped-bundle_v2.5.2_linux_amd64.tar.gz
, extract the tarball to a local directory:CODEtar -xzvf dkp-air-gapped-bundle_v2.5.2_linux_amd64.tar.gz && cd dkp-v2.5.2/kib
Follow the instructions below to build an AMI.
Build the GPU Image
Using the Konvoy Image Builder, you can build an image that has support to use NVIDIA GPU hardware to support GPU workloads.
NOTE: The NVIDIA driver requires a specific Linux kernel version. Make sure that the base image for the OS version has the required kernel version.
See Supported Infrastructure Operating Systems for a list of OS versions and the corresponding kernel versions known to work with the NVIDIA driver.
If the NVIDIA runfile installer has not been downloaded, then retrieve and install the download first by running the following command. The first line in the command below downloads and installs the runfile and the second line places it in the artifacts directory (you must create an artifacts
directory if you don’t already have one).
curl -O https://download.nvidia.com/XFree86/Linux-x86_64/470.82.01/NVIDIA-Linux-x86_64-470.82.01.run
mv NVIDIA-Linux-x86_64-470.82.01.run artifacts
DKP supported NVIDIA driver version is 470.x.
To build an image for use on GPU enabled hardware, perform the following steps.
In your
overrides/nvidia.yaml
file, add the following to enable GPU builds. You can also access and use the overrides repo or in the documentation under Nvidia GPU Override File or Offline Nvidia Override file.Non-air-gapped GPU override:
CODEgpu: types: - nvidia build_name_extra: "-nvidia"
Air-gapped GPU override:
CODE# Use this file when building a machine image, not as a override secret for preprovisioned environments nvidia_runfile_local_file: "{{ playbook_dir}}/../artifacts/{{ nvidia_runfile_installer }}" gpu: types: - nvidia build_name_extra: "-nvidia"
Build your image using the following Konvoy Image Builder commands, making sure to include the flag
--instance-type
that specifies an AWS instance that has an available GPU:
AWS Example:CODEkonvoy-image build --region us-east-1 --instance-type=p2.xlarge --source-ami=ami-12345abcdef images/ami/centos-7.yaml --overrides overrides/nvidia.yaml
In this example, we chose an instance type with an NVIDIA GPU using the
--instance-type
flag, and we provided the NVIDIA overrides using the--overrides
flag. See KIB with AWS for more information on creating an AMI.
Additional helpful information can be found in the NVIDIA Device Plug-in for Kubernetes instructions and the Installation Guide of Supported Platforms.
See also: NVIDIA documentation