-
Notifications
You must be signed in to change notification settings - Fork 61
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
Conversation
/cc @klueska |
6ffbc0d
to
25d2d7a
Compare
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]>
|
||
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. | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
@klueska I hope the current version has addressed all your comment. Can you take another look? Thanks! |
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).