Skip to content

Commit 85876b0

Browse files
authored
fix: teraform for oci gpu based vm (#2810)
Signed-off-by: Akash Jaiswal <akashjaiswal3846@gmail.com>
1 parent d21e03e commit 85876b0

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

docs/proposals/2432-gpu-testing-on-llm-blueprints/OCI VM/bootstrap.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ echo \
3838
sudo apt-get update -y
3939
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
4040

41+
# -------------------------------
42+
# Install Kind and nvkind
43+
# -------------------------------
44+
45+
# For AMD64 / x86_64
46+
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.30.0/kind-linux-amd64
47+
chmod +x ./kind
48+
sudo mv ./kind /usr/local/bin/kind
49+
50+
echo "Install nvkind"
51+
sudo go install github.com/NVIDIA/nvkind/cmd/nvkind@latest
52+
sudo cp /root/go/bin/nvkind /usr/local/bin/
53+
4154
# -------------------------------
4255
# Install NVIDIA Container Toolkit
4356
# -------------------------------
@@ -71,6 +84,18 @@ curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
7184
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
7285
rm kubectl
7386

87+
# Install NVIDIA Driver
88+
sudo apt update
89+
sudo apt install nvidia-driver-535 -y
90+
sudo apt install nvidia-utils-535
91+
92+
## Privilaged access for docker to make sure Kind can access GPU resources
93+
alias docker="sudo docker"
94+
alias kubectl="sudo kubectl"
95+
alias kind="sudo kind"
96+
alias helm="sudo helm"
97+
alias nvkind="sudo nvkind"
98+
7499
# Verify installs
75100
echo "✅ Installed versions:"
76101
go version

docs/proposals/2432-gpu-testing-on-llm-blueprints/OCI VM/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ resource "oci_core_instance" "gpu_vm" {
125125
source_details {
126126
source_type = "image"
127127
source_id = data.oci_core_images.ubuntu_image.images[0].id
128+
boot_volume_size_in_gbs = 512
128129
}
129130

130131
metadata = {

0 commit comments

Comments
 (0)