This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OWNER=YOUR_GITHUB_USERNAME | |
REPO=YOUR_GITHUB_REPO | |
GITHUB_TOKEN=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN | |
# Bootstrap BLR1 cluster | |
kubectx blr1 | |
flux bootstrap github \ | |
--owner=$OWNER \ | |
--repository=$REPO \ | |
--path=fleet/blr1 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create DOKS clusters | |
doctl k8s cluster create do-demo-blr1 --region blr1 --size s-4vcpu-8gb --count=1 | |
doctl k8s cluster create do-demo-sgp1 --region sgp1 --size s-4vcpu-8gb --count=1 | |
doctl k8s cluster create do-demo-lon1 --region lon1 --size s-4vcpu-8gb --count=1 | |
# Configure kubeconfig | |
doctl k8s clusters kubeconfig save do-demo-blr1 | |
doctl k8s clusters kubeconfig save do-demo-sgp1 | |
doctl k8s clusters kubeconfig save do-demo-lon1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Triton service | |
cat <<EOF > triton-service.yaml | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: triton | |
namespace: model-server | |
spec: | |
type: NodePort | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Triton deployment | |
cat <<EOF > triton-deploy.yaml | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: triton | |
name: triton | |
namespace: model-server | |
spec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the namespace | |
kubectl create ns model-registry | |
# Create the tenant in the namespace | |
kubectl minio tenant create model-registry \ | |
--servers 1 \ | |
--volumes 4 \ | |
--capacity 5Gi \ | |
--namespace model-registry \ | |
--storage-class local-path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install MinIO operator | |
wget https://github.com/minio/operator/releases/download/v4.2.7/kubectl-minio_4.2.7_linux_amd64 -O kubectl-minio | |
chmod +x kubectl-minio | |
mv kubectl-minio /usr/local/bin/ | |
kubectl minio version | |
kubectl minio init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl run gpu-test \ | |
--rm -t -i \ | |
--restart=Never \ | |
--image=nvcr.io/nvidia/cuda:10.1-base-ubuntu18.04 nvidia-smi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add NVIDIA repo and refresh Helm | |
helm repo add nvidia https://nvidia.github.io/gpu-operator && helm repo update | |
# install GPU operator Helm chart | |
helm install --wait --generate-name \ | |
nvidia/gpu-operator $HELM_OPTIONS \ | |
--set operator.defaultRuntime=containerd \ | |
--set toolkit.env[0].name=CONTAINERD_CONFIG \ | |
--set toolkit.env[0].value=$CONTAINERD_CONFIG \ | |
--set toolkit.env[1].name=CONTAINERD_SOCKET \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if grep -q 'data-dir' /etc/rancher/rke2/config.yaml; then | |
DATA_DIR=$(grep 'data-dir' /etc/rancher/rke2/config.yaml | awk '{print $2}') | |
else | |
DATA_DIR=/var/lib/rancher/rke2 | |
fi | |
CONTAINERD_CONFIG=$DATA_DIR/agent/etc/containerd/config.toml.tmpl | |
cat <<EOF | sudo tee $CONTAINERD_CONFIG | |
version = 2 | |
[plugins] | |
[plugins."io.containerd.grpc.v1.cri"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install Helm3 | |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | |
chmod 700 get_helm.sh | |
./get_helm.sh |