diff --git a/packages/k3d-gpu/Makefile b/packages/k3d-gpu/Makefile index 006521fe7..6bbcbbf14 100644 --- a/packages/k3d-gpu/Makefile +++ b/packages/k3d-gpu/Makefile @@ -1,47 +1,11 @@ - -REG_PORT ?= 5000 -REG_NAME ?= registry - MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) -ORGANIZATION := defenseunicorns -PLATFORM := linux/amd64 -TAG := latest -UDS_CORE := k3d-core-slim-dev:0.24.0 -K3S_TAG := $(shell jq -r .k3s_tag ${MAKEFILE_DIR}/version_config.json) -CUDA_TAG := $(shell jq -r .cuda_tag ${MAKEFILE_DIR}/version_config.json) - -echo-config: - @echo "DIR: ${MAKEFILE_DIR}" - @echo "K3S_TAG: ${K3S_TAG}" - @echo "CUDA_TAG: ${CUDA_TAG}" - -local-registry: ## Start up a local container registry. Errors in this target are ignored. - @echo "Creating local Docker registry..." - -@docker run -d -p ${REG_PORT}:5000 --restart=always --name ${REG_NAME} registry:2 - @echo "Local registry created at localhost:${REG_PORT}" - -build-k3d-gpu: local-registry echo-config ## Build the k3d-gpu-support image -# Change to the root of the repository and build the image - @cd ${MAKEFILE_DIR}/../.. && \ - docker build \ - --platform=${PLATFORM} \ - --build-arg K3S_TAG=${K3S_TAG} \ - --build-arg CUDA_TAG=${CUDA_TAG} \ - -t ghcr.io/${ORGANIZATION}/k3d-gpu-support:${TAG} \ - -f ${MAKEFILE_DIR}/Dockerfile . -# Tag the image for the local registry - @docker tag ghcr.io/${ORGANIZATION}/k3d-gpu-support:${TAG} localhost:${REG_PORT}/${ORGANIZATION}/k3d-gpu-support:${TAG} - -push-k3d-gpu: local-registry build-k3d-gpu - @docker push localhost:${REG_PORT}/${ORGANIZATION}/k3d-gpu-support:${TAG} -uds-gpu-cluster: local-registry build-k3d-gpu push-k3d-gpu - uds deploy ${UDS_CORE} --set K3D_EXTRA_ARGS="--gpus=all --image=localhost:${REG_PORT}/${ORGANIZATION}/k3d-gpu-support:${TAG}" --confirm +k3d-gpu-package: + @cd ${MAKEFILE_DIR} && \ + uds zarf package create -test-k3d-gpu: - @uds zarf tools kubectl apply -f ${MAKEFILE_DIR}/test/cuda-vector-add.yaml - @uds zarf tools kubectl wait --for=jsonpath='{.status.phase}'=Succeeded --timeout=15s pod -l app=gpu-pod - @uds zarf tools kubectl logs -l app=gpu-pod - @uds zarf tools kubectl delete -f ${MAKEFILE_DIR}/test/cuda-vector-add.yaml +create-uds-gpu-cluster: + @cd ${MAKEFILE_DIR} && \ + uds zarf package deploy zarf-package-k3d-gpu-amd64-*.tar.zst --confirm -.PHONY: all local-registry build-k3d-gpu push-k3d-gpu test-k3d-gpu +.PHONY: k3d-gpu-package create-uds-gpu-cluster diff --git a/packages/k3d-gpu/version_config.json b/packages/k3d-gpu/version_config.json deleted file mode 100644 index 0d2934299..000000000 --- a/packages/k3d-gpu/version_config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "k3s_tag": "v1.28.8-k3s1", - "cuda_tag": "12.4.1-base-ubuntu22.04" - }