Skip to content

Commit ec3a6e6

Browse files
committed
update homepage
1 parent 8c1e051 commit ec3a6e6

File tree

12 files changed

+1178
-430
lines changed

12 files changed

+1178
-430
lines changed

.cursor/rules/google-style-guide.mdc

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: false
5+
---
6+
---
7+
description:
8+
globs:
9+
alwaysApply: true
10+
---
11+
---
12+
description: |
13+
Enforce Google's Developer Style Guide principles for technical documentation.
14+
These rules guide the AI to create clear, consistent, and user-friendly documentation.
15+
globs:
16+
- "*.md"
17+
- "*.mdx"
18+
- "*.txt"
19+
---
20+
21+
# Google Developer Style Guide for Technical Documentation
22+
23+
## Document Structure
24+
- Always use sentence case for all Markdown headings (e.g., '# This is a heading' not '# This Is A Heading').
25+
- Begin each main section with a brief one or two sentence overview that summarizes the section's content.
26+
- Organize content into logical sections with clear and concise headings and subheadings.
27+
- Structure the documentation in a hierarchical manner, using heading levels (# for main titles, ## for sections, ### for subsections).
28+
29+
## Lists and Formatting
30+
- Use Markdown numbered lists (1., 2., etc.) for sequential steps or ordered procedures.
31+
- Use Markdown unordered lists (-, *, etc.) for collections of related items that don't have a specific order.
32+
- Format code-related text using Markdown code blocks with the appropriate language identifier for syntax highlighting:
33+
34+
```python
35+
def example_function():
36+
return "Hello, world!"
37+
```
38+
- Format UI elements such as button labels and menu items using bold Markdown syntax (**UI Element**).
39+
- Use italic text (*text*) sparingly, primarily for emphasis, terms, or book titles.
40+
- Present pairs of related data (like terms and definitions) using description lists or bold terms followed by their explanations.
41+
- Use unambiguous date formatting, preferably YYYY-MM-DD.
42+
43+
## Language and Tone
44+
- Always address the reader using the second person pronoun "you" instead of "we" or "us".
45+
- Prefer active voice in sentences. For example, instead of "The file was saved by the system," write "The system saved the file."
46+
- Maintain a friendly, conversational, and helpful tone, similar to explaining a concept to a colleague.
47+
- Use standard American English spelling and punctuation consistently.
48+
- Avoid highly technical jargon without providing clear explanations or definitions.
49+
- Be mindful of using idioms or culturally specific references that might not be universally understood.
50+
- Avoid unnecessary repetition of adjectives and adverbs.
51+
- Write in a clear, concise, and factual manner, avoiding overly casual or promotional language.
52+
53+
## Links and References
54+
- When creating hyperlinks using Markdown, ensure the link text clearly describes the target page (e.g., [Learn more about the API](mdc:url)).
55+
- Prioritize linking to official documentation, well-established technical websites, or academic resources.
56+
- For fundamental concepts crucial to understanding the current topic, provide a brief explanation within the documentation rather than immediately linking externally.
57+
- Reserve external links for more detailed or supplementary information.
58+
59+
## Code Examples
60+
- Always enclose code examples in Markdown code blocks using triple backticks (```) and specify the programming language.
61+
- Precede every code block with a brief paragraph explaining its context and purpose.
62+
- Follow the code block with an explanation of its key parts and expected output.
63+
- Provide substantial, real-world code examples that demonstrate complete or significant functionality rather than isolated snippets.
64+
- If the code example pertains to a specific file or directory, mention its location relative to the project root.
65+
66+
## Images and Diagrams
67+
- When including images or diagrams, use Markdown image syntax and provide descriptive alt text: ![Alt text describing the image](mdc:image.png)
68+
- Prefer PNG format for diagrams and illustrations, and WebP format for other images where appropriate.
69+
- Ensure all images serve a purpose and enhance understanding of the content.
70+
71+
## Warnings, Notes, and Important Information
72+
- Format warnings using Markdown blockquotes with a clear prefix:
73+
> :::warning
74+
75+
This action cannont be undone.
76+
77+
:::
78+
79+
- Format notes using Markdown blockquotes:
80+
> :::warning
81+
82+
Additional configuration may be required for custom installations.
83+
84+
:::
85+
- Keep warning, note, and important information messages brief and to the point, focusing on essential information.
86+
87+
## Step-by-Step Instructions
88+
- Present step-by-step instructions using Markdown numbered lists.
89+
- Begin each step with a clear action verb (e.g., "Click", "Open", "Enter").
90+
- Ensure each step represents a single, actionable task.
91+
- Provide sufficient detail for the target audience to understand and execute each action without requiring additional assumptions.

docs/get-started/connect-to-runpod.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RunPod offers multiple ways to connect and manage your compute resources. Choose
99
## Web interface
1010

1111
The [RunPod web interface](https://runpod.io/console/home) provides an intuitive way to:
12+
1213
- Launch and manage Pods.
1314
- Monitor resource usage.
1415
- Access Pod terminals.
@@ -53,4 +54,4 @@ RunPod provides SDKs to help you integrate our services into your applications:
5354

5455
## VSCode
5556

56-
Follow [this tutorial](/tutorials/pods/connect-to-vscode) to learn how to connect your VSCode environment to a Pod for remote development.
57+
Follow [this tutorial](/tutorials/pods/connect-to-vscode) to learn how to connect your VSCode environment to a Pod for remote development.

docs/instant-clusters/index.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ Instant Clusters support up to 8 interfaces per Pod. Each interface (`eth1` - `e
4949

5050
The following environment variables are available in all Pods:
5151

52-
| Environment Variable | Description |
53-
| ------------------------------ | ------------------------------------------------------------ |
54-
| `PRIMARY_ADDR` / `MASTER_ADDR` | The address of the primary Pod. |
55-
| `PRIMARY_PORT` / `MASTER_PORT` | The port of the primary Pod (all ports are available). |
56-
| `NODE_ADDR` | The static IP of this Pod within the cluster network. |
52+
| Environment Variable | Description |
53+
| ------------------------------ | ----------------------------------------------------------------------------- |
54+
| `PRIMARY_ADDR` / `MASTER_ADDR` | The address of the primary Pod. |
55+
| `PRIMARY_PORT` / `MASTER_PORT` | The port of the primary Pod (all ports are available). |
56+
| `NODE_ADDR` | The static IP of this Pod within the cluster network. |
5757
| `NODE_RANK` | The Cluster (i.e., global) rank assigned to this Pod (0 for the primary Pod). |
58-
| `NUM_NODES` | The number of Pods in the Cluster. |
59-
| `NUM_TRAINERS` | The number of GPUs per Pod. |
60-
| `HOST_NODE_ADDR` | Defined as `PRIMARY_ADDR:PRIMARY_PORT` for convenience. |
61-
| `WORLD_SIZE` | The total number of GPUs in the Cluster (`NUM_NODES` * `NUM_TRAINERS`). |
58+
| `NUM_NODES` | The number of Pods in the Cluster. |
59+
| `NUM_TRAINERS` | The number of GPUs per Pod. |
60+
| `HOST_NODE_ADDR` | Defined as `PRIMARY_ADDR:PRIMARY_PORT` for convenience. |
61+
| `WORLD_SIZE` | The total number of GPUs in the Cluster (`NUM_NODES` * `NUM_TRAINERS`). |
6262

6363
Each Pod receives a static IP (`NODE_ADDR`) on the overlay network. When a Cluster is deployed, the system designates one Pod as the primary node by setting the `PRIMARY_ADDR` and `PRIMARY_PORT` environment variables. This simplifies working with multiprocessing libraries that require a primary node.
6464

@@ -98,44 +98,44 @@ Repeat these steps for **each Pod** in your cluster.
9898

9999
Let's look at the code in our `main.py` file:
100100

101-
```python
101+
```python
102102
import os
103103
import torch
104104
import torch.distributed as dist
105105

106106
def init_distributed():
107-
"""Initialize the distributed training environment"""
108-
# Initialize the process group
109-
dist.init_process_group(backend="nccl")
110-
111-
# Get local rank and global rank
112-
local_rank = int(os.environ["LOCAL_RANK"])
113-
global_rank = dist.get_rank()
114-
world_size = dist.get_world_size()
115-
116-
# Set device for this process
117-
device = torch.device(f"cuda:{local_rank}")
118-
torch.cuda.set_device(device)
119-
120-
return local_rank, global_rank, world_size, device
107+
"""Initialize the distributed training environment"""
108+
# Initialize the process group
109+
dist.init_process_group(backend="nccl")
110+
111+
# Get local rank and global rank
112+
local_rank = int(os.environ["LOCAL_RANK"])
113+
global_rank = dist.get_rank()
114+
world_size = dist.get_world_size()
115+
116+
# Set device for this process
117+
device = torch.device(f"cuda:{local_rank}")
118+
torch.cuda.set_device(device)
119+
120+
return local_rank, global_rank, world_size, device
121121

122122
def cleanup_distributed():
123-
"""Clean up the distributed environment"""
124-
dist.destroy_process_group()
123+
"""Clean up the distributed environment"""
124+
dist.destroy_process_group()
125125

126126
def main():
127-
# Initialize distributed environment
128-
local_rank, global_rank, world_size, device = init_distributed()
129-
130-
print(f"Running on rank {global_rank}/{world_size-1} (local rank: {local_rank}), device: {device}")
131-
132-
# Your code here
133-
134-
# Clean up distributed environment when done
135-
cleanup_distributed()
136-
127+
# Initialize distributed environment
128+
local_rank, global_rank, world_size, device = init_distributed()
129+
130+
print(f"Running on rank {global_rank}/{world_size-1} (local rank: {local_rank}), device: {device}")
131+
132+
# Your code here
133+
134+
# Clean up distributed environment when done
135+
cleanup_distributed()
136+
137137
if __name__ == "__main__":
138-
main()
138+
main()
139139
```
140140

141141
This is the minimal code necessary for initializing a distributed environment. The `main()` function prints the local and global rank for each GPU process (this is also where you can add your own code). `LOCAL_RANK` is assigned dynamically to each process by PyTorch. All other environment variables are set automatically by RunPod during deployment.

docs/overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Use Serverless to:
2828
- Queue jobs efficiently **without managing infrastructure**.
2929

3030
### Get started with Serverless
31+
3132
- [Build your first Serverless app](/serverless/get-started)
3233
- [Run any LLM as an endpoint using vLLM workers](/serverless/workers/vllm/get-started)
3334
- [Tutorial: Create a Serverless endpoint with Stable Diffusion](/tutorials/serverless/gpu/run-your-first)
@@ -67,4 +68,4 @@ If you need help, reach out to us on [Discord](https://discord.gg/cUpRmau42V), v
6768

6869
- [Create and manage your account](/get-started/manage-accounts)
6970
- [Add funds to your account](/get-started/billing-information)
70-
- [Complete your first tutorial](/tutorials/introduction/overview)
71+
- [Complete your first tutorial](/tutorials/introduction/overview)

docs/pods/manage-pods.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Use the following command to stop a Pod after 2 hours:
122122
```bash
123123
sleep 2h; runpodctl stop pod $RUNPOD_POD_ID &
124124
```
125+
125126
This command uses sleep to wait for 2 hours before executing the `runpodctl stop pod` command to stop the Pod.
126127
The `&` at the end runs the command in the background, allowing you to continue using the SSH session.
127128

@@ -134,13 +135,13 @@ To stop a Pod after 2 hours using the web terminal, enter:
134135
```bash
135136
nohup bash -c "sleep 2h; runpodctl stop pod $RUNPOD_POD_ID" &
136137
```
138+
137139
`nohup` ensures the process continues running if you close the web terminal window.
138140

139141
</TabItem>
140142

141143
</Tabs>
142144

143-
144145
## Start a Pod
145146

146147
Pods start as soon as they are created, but you can resume a Pod that has been stopped.
@@ -212,4 +213,4 @@ If you're using the CLI, use the following command to list your Pods:
212213

213214
```bash
214215
runpodctl get pod
215-
```
216+
```

docusaurus.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ const config = {
234234
async: true,
235235
defer: true,
236236
},
237+
{
238+
src: "https://kit.fontawesome.com/4b9ba14b0f.js",
239+
crossOrigin: "anonymous",
240+
},
237241
// {
238242
// src: "/scripts/fullstory.js",
239243
// async: true,
Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,6 @@
1-
import Heading from "@theme/Heading";
2-
import clsx from "clsx";
1+
import React from 'react';
32
import styles from "./styles.module.css";
43

5-
const FeatureList = [
6-
{
7-
title: "Serverless",
8-
Svg: require("@site/static/img/home_2.svg").default,
9-
url: "/serverless/overview", // Add URL here
10-
description: (
11-
<>
12-
<a href="/serverless/overview">
13-
<b>Serverless</b>
14-
</a>{" "}
15-
service provides pay-per-second serverless computing with autoscaling, quick start times, and robust security in
16-
its Secure Cloud.
17-
</>
18-
),
19-
},
20-
{
21-
title: "Pods",
22-
Svg: require("@site/static/img/home_1.svg").default,
23-
url: "/pods/overview", // Add URL here
24-
description: (
25-
<>
26-
<a href="/pods/overview">
27-
<b>Pods</b>
28-
</a>{" "}
29-
offer fast deployment of container-based GPU instances, with Secure Cloud for high reliability and security, and
30-
Community Cloud for a secure peer-to-peer network.
31-
</>
32-
),
33-
},
34-
{
35-
title: "vLLM",
36-
Svg: require("@site/static/img/home_3.svg").default,
37-
url: "/serverless/workers/vllm/overview",
38-
description: (
39-
<>
40-
<a href="/serverless/workers/vllm/overview">
41-
<b>vLLM Workers</b>
42-
</a>{" "}
43-
are blazingly fast OpenAI-compatible serverless endpoints for any LLM.
44-
</>
45-
),
46-
},
47-
];
48-
49-
function Feature({ Svg, title, description, url }) {
50-
return (
51-
<div className={clsx("col col--4")}>
52-
<div className="text--center">
53-
<a href={url}>
54-
<Svg className={styles.featureSvg} role="img" />
55-
</a>
56-
</div>
57-
<div className="text--center padding-horiz--md">
58-
<Heading as="h2">{title}</Heading>
59-
<p>{description}</p>
60-
</div>
61-
</div>
62-
);
63-
}
64-
654
export default function HomepageFeatures() {
66-
return (
67-
<section className={styles.features}>
68-
<div className="container">
69-
<div className="row">
70-
{FeatureList.map((props, idx) => <Feature key={idx} {...props} />)}
71-
</div>
72-
</div>
73-
</section>
74-
);
5+
return null;
756
}

0 commit comments

Comments
 (0)