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

Improve README.md #107

Merged
merged 1 commit into from
May 6, 2024
Merged

Improve README.md #107

merged 1 commit into from
May 6, 2024

Conversation

yuanchen8911
Copy link
Collaborator

@yuanchen8911 yuanchen8911 commented May 6, 2024

This PR improves the instructions in the README file by

  1. Fixing typos in the example kubectl commands by removing the extra $ at the beginning and the command output. So a user can directly copy and paste the example commands to run.
  2. Adding the command nvidia-smi -L to show the GPU information on the node.

@ArangoGutierrez ArangoGutierrez requested a review from klueska May 6, 2024 17:01
@yuanchen8911 yuanchen8911 changed the title Update README.md Improve README.md May 6, 2024
Copy link
Collaborator

@ArangoGutierrez ArangoGutierrez left a comment

Choose a reason for hiding this comment

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

Could you squash the commits please

Copy link
Collaborator

@ArangoGutierrez ArangoGutierrez left a comment

Choose a reason for hiding this comment

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

Some initial comments

README.md Outdated
@@ -32,15 +32,20 @@ First since we'll launch kind with GPU support, ensure that the following prereq
Container Runtime to use volume mounts to select devices to inject into a
container.

1. Show the current GPU information of the machine
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@yuanchen8911 yuanchen8911 May 6, 2024

Choose a reason for hiding this comment

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

Yes, but would it be helpful to have it in the root README? For example, I was following the instructions in this README in my first attempt.

README.md Outdated
We start by first cloning this repository and `cd`ing into it.
All of the scripts and example Pod specs used in this demo are in the `demo`
subdirectory, so take a moment to browse through the various files and see
what's available:

```
```bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see bash/console should we agree on a single one? is there a benefit of having one vs the other on specific steps? (is one better for copy/pasting than the other for example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed all of them to console.

README.md Outdated Show resolved Hide resolved
README.md Outdated
Comment on lines 71 to 77
```console
$ kubectl get pods -n nvidia-dra-driver
```
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the purpose of separating this if you keep the $?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A user can copy/paste and run the command directly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not with the $still there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A user can copy/paste and run an example command directly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm trying to say that you didn't remove the $ in your diff.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed it.

Comment on lines -99 to +111
$ kubectl logs -n gpu-test1 -l app=pod
kubectl logs -n gpu-test1 -l app=pod
```
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

I looked at the generated README with this change, and I prefer the look of the original. Is the purpose here to make it easier to copy-and-paste the command where the output is attached?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, otherwise, a user has to manually delete the character $. Also some examples contain the output of a command in the console quote, which makes the command invalid.

README.md Outdated
@@ -58,13 +63,15 @@ From here we will build the image for the example resource driver:
This also makes the built images available to the `kind` cluster.

We now install the NVIDIA GPU DRA driver:
```
```bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why sometimes bash and sometimes console?

Copy link
Collaborator Author

@yuanchen8911 yuanchen8911 May 6, 2024

Choose a reason for hiding this comment

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

It's inherited from the original script. Let's use console, which I believe is what's used in k8s.

Copy link
Collaborator

Choose a reason for hiding this comment

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

README.md Outdated Show resolved Hide resolved
@yuanchen8911 yuanchen8911 force-pushed the patch-1 branch 2 times, most recently from 386af85 to 1a974c1 Compare May 6, 2024 18:03
README.md Outdated
Comment on lines 30 to 37
1. Set the `accept-nvidia-visible-devices-as-volume-mounts` option to `true` in
the `/etc/nvidia-container-runtime/config.toml` file to configure the NVIDIA
Container Runtime to use volume mounts to select devices to inject into a
container.

Copy link
Collaborator

Choose a reason for hiding this comment

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

While you're changing things do you want to add this command below this step as well:

sudo nvidia-ctk config --set accept-nvidia-visible-devices-as-volume-mounts=true --in-place

README.md Outdated
Comment on lines 81 to 98
Where the running the first three examples should produce output similar to the following:
Depending on which GPUs are available, running the first three examples will produce output similar to the following:
```console
$ kubectl apply --filename=demo/specs/quickstart/gpu-test{1,2,3}.yaml
...

kubectl apply --filename=demo/specs/quickstart/gpu-test{1,2,3}.yaml
```

```console
$ kubectl get pod -A
kubectl get pod -A -l app=pod
Copy link
Collaborator

@klueska klueska May 6, 2024

Choose a reason for hiding this comment

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

This doesn't read well after this change. Can you update the text to first describe running the apply call and then running kubectl get to see them starting up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated it.

README.md Outdated
Comment on lines 116 to 135
$ ./demo/clusters/kind/delete-cluster.sh
./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.

wrap in console?

This PR improves the instructions in the README file by
1. Fixing typos in the example `kubectl` commands by removing the extra `$` at the beginning and the command output.
2. Adding the command `nvidia-smi -L` to show the GPU information on the node.

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

Update README.md

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

Update README.md

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

Update README.md

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

Update README.md

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

Update README.md

Co-authored-by: Kevin Klues <[email protected]>
Signed-off-by: Yuan Chen <[email protected]>

Update README.md

Co-authored-by: Kevin Klues <[email protected]>
Signed-off-by: Yuan Chen <[email protected]>

Apply Kevin's changes

Remove $

Update

Add additional command
@yuanchen8911
Copy link
Collaborator Author

Thanks for the comments. I think it's looking much better now.

@klueska
Copy link
Collaborator

klueska commented May 6, 2024

There's still some things worth changing, but this is definitely better than before.

@klueska klueska dismissed ArangoGutierrez’s stale review May 6, 2024 18:35

The changes requested have been addressed.

@klueska klueska merged commit d6d0eb8 into NVIDIA:main May 6, 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.

3 participants