diff --git a/demo/specs/mig/README.md b/demo/specs/mig/README.md new file mode 100644 index 00000000..752e4e25 --- /dev/null +++ b/demo/specs/mig/README.md @@ -0,0 +1,61 @@ +#### Show the current MIG configuration of the machine +```console +nvidia-smi --query-gpu=index,name,uuid,mig.mode.current --format=csv +nvidia-smi -L +``` + +#### Show current state of the cluster +```console +kubectl get pod -A +``` + +#### Show the yaml files for MIG example apps: +```console +vim -O gpu-test4.yaml gpu-test5.yaml gpu-test6.yaml +``` + +#### Deploy the 3 MIG example apps above: +```console +kubectl apply --filename=gpu-test{4,5,6}.yaml +``` + +#### Show all the pods starting up: +```console +kubectl get pod -A -l app=pod +``` + +#### Show the output of nvidia-smi: +```console +nvidia-smi -L +``` + +#### Show the MIG devices allocated to each pod in gpu-test4 +```console +for pod in \ + $(kubectl get pod \ + -n gpu-test4 \ + --output=jsonpath='{.items[*].metadata.name}'); \ +do \ + echo "${pod}:" + kubectl logs -n gpu-test4 ${pod} -c ctr0 + kubectl logs -n gpu-test4 ${pod} -c ctr1 + kubectl logs -n gpu-test4 ${pod} -c ctr2 + kubectl logs -n gpu-test4 ${pod} -c ctr3 + echo "" +done +``` + +#### Delete this MIG examples: +```console +kubectl delete --filename=gpu-test{4,5,6}.yaml +``` + +#### Show the pods terminating: +```console +kubectl get pods -A -l app=pod +``` + +#### Show the output of nvidia-smi +```console +nvidia-smi -L +``` diff --git a/demo/specs/quickstart/gpu-test4.yaml b/demo/specs/mig/gpu-test4.yaml similarity index 100% rename from demo/specs/quickstart/gpu-test4.yaml rename to demo/specs/mig/gpu-test4.yaml diff --git a/demo/specs/quickstart/gpu-test5.yaml b/demo/specs/mig/gpu-test5.yaml similarity index 100% rename from demo/specs/quickstart/gpu-test5.yaml rename to demo/specs/mig/gpu-test5.yaml diff --git a/demo/specs/quickstart/gpu-test6.yaml b/demo/specs/mig/gpu-test6.yaml similarity index 100% rename from demo/specs/quickstart/gpu-test6.yaml rename to demo/specs/mig/gpu-test6.yaml diff --git a/demo/specs/quickstart/README.md b/demo/specs/quickstart/README.md index b7feeca5..8acab607 100644 --- a/demo/specs/quickstart/README.md +++ b/demo/specs/quickstart/README.md @@ -3,15 +3,14 @@ kubectl get pod -A ``` -#### Show the current MIG configuration of the machine +#### Show the yaml files for the first 3 example apps discussed in the [KubeCon presentation](https://sched.co/1R2oG) ```console -nvidia-smi --query-gpu=index,name,uuid,mig.mode.current --format=csv -nvidia-smi -L +vim -O gpu-test1.yaml gpu-test2.yaml gpu-test3.yaml ``` -#### Deploy the 4 example apps discussed in the slides +#### Deploy the 3 example apps above ```console -kubectl apply --filename=gpu-test{1,2,3,4}.yaml +kubectl apply --filename=gpu-test{1,2,3}.yaml ``` #### Show all the pods starting up @@ -19,11 +18,6 @@ kubectl apply --filename=gpu-test{1,2,3,4}.yaml kubectl get pod -A ``` -#### Show the yaml files for the first 3 example apps -```console -vim -O gpu-test1.yaml gpu-test2.yaml gpu-test3.yaml -``` - #### Show the GPUs allocated to each ```console kubectl logs -n gpu-test1 -l app=pod @@ -31,48 +25,18 @@ kubectl logs -n gpu-test2 pod --all-containers kubectl logs -n gpu-test3 -l app=pod ``` -#### Show the yaml file for the complicated example with MIG devices -```console -vim -O gpu-test4.yaml -``` - -#### Show the pods running -```console -kubectl get pod -A -``` - -#### Show the output of nvidia-smi -```console -nvidia-smi -L -``` +#### Show the MPS (Multi-Process Service) example -#### Show the MIG devices allocated to each pod ```console -for pod in \ - $(kubectl get pod \ - -n gpu-test4 \ - --output=jsonpath='{.items[*].metadata.name}'); \ -do \ - echo "${pod}:" - kubectl logs -n gpu-test4 ${pod} -c ctr0 - kubectl logs -n gpu-test4 ${pod} -c ctr1 - kubectl logs -n gpu-test4 ${pod} -c ctr2 - kubectl logs -n gpu-test4 ${pod} -c ctr3 - echo "" -done +vim -O gpu-test-mps.yaml ``` -#### Delete this example +#### Deploy the MPS example ```console -kubectl delete -f gpu-test4.yaml -``` - -#### Show the pods terminating -```console -kubectl get pod -A +kubectl apply -f gpu-test-mps.yaml ``` -#### Show the output of nvidia-smi +#### Show the pod running ```console -nvidia-smi -L +kubectl get pod -n sharing-demo -l app=pod ```