Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a svg demo file showing the DRA use: install, configure and use #108

Merged
merged 1 commit into from
May 8, 2024

Conversation

yuanchen8911
Copy link
Collaborator

@yuanchen8911 yuanchen8911 commented May 6, 2024

This PR adds a svg file to README showing a complete example with all the steps outlined in the README on how to install, configure and use DRA to run a pod on a Linux workstation, including all the commands and output.

Hopefully, It can assist users in comparing and identifying issues as they play around.

https://github.com/yuanchen8911/k8s-dra-driver/blob/demo-video/demo/specs/quickstart/basic-demo.svg

Not sure where to place the svg file. Maybe we should create a separate folder for it (and future demo videos if any).

@yuanchen8911
Copy link
Collaborator Author

/cc @klueska @ArangoGutierrez

@yuanchen8911
Copy link
Collaborator Author

yuanchen8911 commented May 6, 2024

/cc @klueska
/cc @ArangoGutierrez

@yuanchen8911 yuanchen8911 changed the title Add a demo svg file showing the baisc DRA use Add a svg demo file showing the DRA use: install, configure and use May 6, 2024
README.md Outdated Show resolved Hide resolved
@yuanchen8911 yuanchen8911 force-pushed the demo-video branch 2 times, most recently from 6ffbc0d to 25d2d7a Compare May 6, 2024 20:28
@yuanchen8911 yuanchen8911 requested a review from klueska May 6, 2024 20:29
README.md Outdated Show resolved Hide resolved
Update demo

Adjust demo svg format

Update svg format

Update the description of demo.

update

Signed-off-by: Yuan Chen <[email protected]>
Signed-off-by: Yuan Chen <[email protected]>

Update tje demo svg description

Signed-off-by: Yuan Chen <[email protected]>

Update the svg demo

Signed-off-by: Yuan Chen <[email protected]>

Remove duplicated info.

Signed-off-by: Yuan Chen <[email protected]>

Clean up

Signed-off-by: Yuan Chen <[email protected]>
Comment on lines +56 to +64

Here's a demo showing how to install and configure DRA, and run a pod in a `kind` cluster on a Linux workstation.

<p align="center">
<img width="800" src="./demo/specs/quickstart/basic-demo.svg">
</p>

Below are the detailed, step-by-step instructions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general this change looks good now. My only worry is keeping this SVG in sync as we make changes to the README. Is there someway to add the code to generate it in the repo instead of just importing the final image?

Copy link
Collaborator Author

@yuanchen8911 yuanchen8911 May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I assume we won't change the basic flow and example very frequently.
The svg file was generated from the following description script file using a tool I created. recdemo.sh <input: demo script> <output: svg file>.

We can add the script and demo files to a new folder and update/build svg files (e.g., in Makefile) when things change. That's how KWOK manages its examples and demos.

How about doing it in future PRs?

# Demonstrate the basic use of DRA in a kind cluster

# Prerequisites: follow the instructions in the README
# 1. Install kind
# 2. Install and configure the NVIDIA container toolkit

# Show the current set of GPUs on the machine
nvidia-smi -L

# Create a kind cluster to run the demo:
./demo/clusters/kind/create-cluster.sh

# Build the image for the example resource driver and the images for the kind cluster:
./demo/clusters/kind/build-dra-driver.sh

# Install the driver in the kind cluster
./demo/clusters/kind/install-dra-driver.sh

# Show two pods running in the nvidia-dra-driver namespace:
kubectl get pods -n nvidia-dra-driver

# Run the examples in the demo/specs/quickstart folder. The README in that directory shows the full script:
# For example, you can run the second test.
kubectl apply --filename=demo/specs/quickstart/gpu-test2.yaml
sleep 2

# Get the pod information
kubectl get pod -n gpu-test2

# Get the GPU resource information of the pod.
"basic.demo" 34L, 1109B                                                                                                      1,1           Top
# 2. Install and configure the NVIDIA container toolkit

# Show the current set of GPUs on the machine
nvidia-smi -L

# Create a kind cluster to run the demo:
./demo/clusters/kind/create-cluster.sh

# Build the image for the example resource driver and the images for the kind cluster:
./demo/clusters/kind/build-dra-driver.sh

# Install the driver in the kind cluster
./demo/clusters/kind/install-dra-driver.sh

# Show two pods running in the nvidia-dra-driver namespace:
kubectl get pods -n nvidia-dra-driver

# Run the examples in the demo/specs/quickstart folder. The README in that directory shows the full script:
# For example, you can run the second test.
kubectl apply --filename=demo/specs/quickstart/gpu-test2.yaml
sleep 2

# Get the pod information
kubectl get pod -n gpu-test2

# Get the GPU resource information of the pod.
kubectl logs -n gpu-test2 pod --all-containers

# Delete the kind cluster and clean up the environment
 ./demo/clusters/kind/delete-cluster.sh

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I'm fine merging it as-is for now.

@yuanchen8911
Copy link
Collaborator Author

@klueska I hope the current version has addressed all your comment. Can you take another look? Thanks!

@yuanchen8911 yuanchen8911 requested a review from klueska May 7, 2024 15:26
@klueska klueska merged commit ee54e6c into NVIDIA:main May 8, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants