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

fixed copy code block bug #448

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions source/cloud/gcp/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ $ gcloud init
Now we can launch a GPU enabled GKE cluster.

```console
$ gcloud container clusters create rapids-gpu-kubeflow \
--accelerator type=nvidia-tesla-a100,count=2 --machine-type a2-highgpu-2g \
--zone us-central1-c --release-channel stable
$ $ gcloud container clusters create rapids-gpu-kubeflow --accelerator type=nvidia-tesla-a100,count=2 --machine-type a2-highgpu-2g --zone us-central1-c --release-channel stable
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$ $ gcloud container clusters create rapids-gpu-kubeflow --accelerator type=nvidia-tesla-a100,count=2 --machine-type a2-highgpu-2g --zone us-central1-c --release-channel stable
$ gcloud container clusters create rapids-gpu-kubeflow --accelerator type=nvidia-tesla-a100,count=2 --machine-type a2-highgpu-2g --zone us-central1-c --release-channel stable

I don't think we want multiple leading $, can you please remove one?

Copy link
Member

Choose a reason for hiding this comment

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

Actually... could you test something? Could you push a change here to remove ALL the leading $ in this code block, and put back the multi-line break? Then we could use the preview at https://rapids-deployment--448.org.readthedocs.build/en/448/cloud/gcp/gke/ to test if the copy button does the expected thing in that case, and could consider just dropping the leading $.

I really think that'd be preferable if it does work... look how much information is hidden by putting this on 1 line:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yay I tested it on a local server and it works! I'll push those changes right now

Copy link
Member

Choose a reason for hiding this comment

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

Ah great, glad that worked! I just tried on the docs preview and also confirmed it works as expected. And I think it's great that it now renders with the entire command visible:

image

Could you please open an issue documenting the work to remove these leading $ from all the shell blocks across this repo?

I've always found them a little annoying anyway (because you have to manually exclude them when copying in a place that doesn't have the copy-button logic that filters them out), and now we have a specific functional reason to prefer not having them.

Don't actually do that implementation work though (except for other multi-line cases like this one where it's necessary to fix them), until @jacobtomlinson gives us his opinion on the issue.

Copy link
Member

@jacobtomlinson jacobtomlinson Oct 8, 2024

Choose a reason for hiding this comment

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

I have a few thoughts on this, @melodywang060 if you could open the issue that James suggested then we can discuss it over there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good, I'll open it up right now 👍🏼

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New issue and documentation is here: #452

```

With this command, you’ve launched a GKE cluster called `rapids-gpu-kubeflow`. You’ve specified that it should use nodes of type a2-highgpu-2g, each with two A100 GPUs.
Expand Down