Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 5 additions & 7 deletions 01_getting_started/01_hello_world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ Simple example demonstrating GPU-based serverless workers with automatic scaling
### 1. Install Dependencies

```bash
pip install -r requirements.txt
uv sync
```

### 2. Configure Environment

Create `.env` file:
### 2. Authenticate

```bash
RUNPOD_API_KEY=your_api_key_here
uv run flash login
```

Get your API key from [Runpod Settings](https://www.runpod.io/console/user/settings).
Or create a `.env` file with `RUNPOD_API_KEY=your_api_key_here`.

### 3. Run Locally

```bash
flash run
uv run flash run
```

Server starts at **http://localhost:8888**
Expand Down
12 changes: 5 additions & 7 deletions 01_getting_started/02_cpu_worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ Simple example demonstrating CPU-based serverless workers with automatic scaling
### 1. Install Dependencies

```bash
pip install -r requirements.txt
uv sync
```

### 2. Configure Environment

Create `.env` file:
### 2. Authenticate

```bash
RUNPOD_API_KEY=your_api_key_here
uv run flash login
```

Get your API key from [Runpod Settings](https://www.runpod.io/console/user/settings).
Or create a `.env` file with `RUNPOD_API_KEY=your_api_key_here`.

### 3. Run Locally

```bash
flash run
uv run flash run
```

Server starts at **http://localhost:8888**
Expand Down
11 changes: 5 additions & 6 deletions 01_getting_started/03_mixed_workers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ If you haven't run the repository-wide setup:

```bash
# Install dependencies
pip install -r requirements.txt
uv sync

# Set API key (choose one):
export RUNPOD_API_KEY=your_api_key_here
# OR create .env file:
echo "RUNPOD_API_KEY=your_api_key_here" > .env
# Authenticate
uv run flash login
# Or create .env file with RUNPOD_API_KEY=your_api_key_here

# Run
flash run
uv run flash run
```

Server starts at http://localhost:8888
Expand Down
11 changes: 5 additions & 6 deletions 01_getting_started/04_dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ If you haven't run the repository-wide setup:

```bash
# Install dependencies
pip install -r requirements.txt
uv sync

# Set API key (choose one):
export RUNPOD_API_KEY=your_api_key_here
# OR create .env file:
echo "RUNPOD_API_KEY=your_api_key_here" > .env
# Authenticate
uv run flash login
# Or create .env file with RUNPOD_API_KEY=your_api_key_here

# Run
flash run
uv run flash run
```

## Dependency Types
Expand Down
4 changes: 2 additions & 2 deletions 01_getting_started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ Managing Python packages and system dependencies.

1. Start with **01_hello_world** to understand the basics
2. Explore **03_mixed_workers** for cost optimization and validation patterns
3. Move to **02_cpu_worker** to learn CPU-only patterns _(coming soon)_
4. Master **04_dependencies** for production readiness _(coming soon)_
3. Move to **02_cpu_worker** to learn CPU-only patterns
4. Master **04_dependencies** for production readiness

## Next Steps

Expand Down
9 changes: 5 additions & 4 deletions 02_ml_inference/01_text_to_speech/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ This example demonstrates running a 1.7B parameter TTS model on serverless GPU i

```bash
cd 02_ml_inference/01_text_to_speech
pip install -r requirements.txt
cp .env.example .env
# Add your RUNPOD_API_KEY to .env
uv sync
uv run flash login
```

Or create a `.env` file with `RUNPOD_API_KEY=your_api_key_here`.

### Run

```bash
flash run
uv run flash run
```

First run provisions the endpoint (~1 min). Server starts at http://localhost:8888
Expand Down
9 changes: 9 additions & 0 deletions 02_ml_inference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ Deploy machine learning models as production-ready APIs. Learn how to serve LLMs

## Examples

### [01_text_to_speech](./01_text_to_speech/)
Text-to-Speech API using Qwen3-TTS.

**What you'll learn:**
- Running HuggingFace models with `@remote` on GPU workers
- Returning binary audio data (WAV) from API endpoints
- Using `bfloat16` precision for memory-efficient inference
- Input validation inside self-contained `@remote` functions

### 01_text_generation _(coming soon)_
LLM inference API with streaming support.

Expand Down
11 changes: 5 additions & 6 deletions 03_advanced_workers/05_load_balancer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@ Load-balanced endpoints use direct HTTP routing to serverless workers, providing
### 1. Install Dependencies

```bash
pip install -r requirements.txt
uv sync
```

### 2. Configure Environment
### 2. Authenticate

```bash
cp .env.example .env
# Add your RUNPOD_API_KEY to .env
uv run flash login
```

Get your API key from [Runpod Settings](https://www.runpod.io/console/user/settings).
Or create a `.env` file with `RUNPOD_API_KEY=your_api_key_here`.

### 3. Run Locally (from repository root)

```bash
flash run
uv run flash run
```

Visit **http://localhost:8888/docs** for interactive API documentation (unified app with all examples).
Expand Down
2 changes: 1 addition & 1 deletion 04_scaling_performance/01_autoscaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Configure Flash worker autoscaling for different workload patterns. This example

## Quick Start

**Prerequisites**: Complete the [repository setup](../../README.md#quick-start) first (clone, `make dev`, set API key).
**Prerequisites**: Complete the [repository setup](../../README.md#quick-start) first, or run `flash login` to authenticate.

```bash
cd 04_scaling_performance/01_autoscaling
Expand Down
12 changes: 5 additions & 7 deletions 05_data_workflows/01_network_volumes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ The GPU worker generates images with Stable Diffusion and writes them to a Runpo
### 1. Install Dependencies

```bash
pip install -r requirements.txt
uv sync
```

### 2. Configure Environment

Create `.env`:
### 2. Authenticate

```bash
RUNPOD_API_KEY=your_api_key_here
uv run flash login
```

Get your API key from [Runpod Settings](https://www.runpod.io/console/user/settings).
Or create a `.env` file with `RUNPOD_API_KEY=your_api_key_here`.

### 3. Run Locally

```bash
flash run
uv run flash run
```

Server starts at `http://localhost:8888`
Expand Down
2 changes: 1 addition & 1 deletion 05_data_workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Handle data storage, processing, and pipelines in Flash applications. Learn pers

## Examples

### 01_network_volumes _(coming soon)_
### [01_network_volumes](./01_network_volumes/)
Persistent storage with Runpod network volumes.

**What you'll learn:**
Expand Down
46 changes: 46 additions & 0 deletions CLI-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ flash <command> --help # Show help for specific command

| Command | Purpose |
|---------|---------|
| [`flash login`](#flash-login) | Authenticate with Runpod |
| [`flash init`](#flash-init) | Create new Flash project |
| [`flash run`](#flash-run) | Run development server |
| [`flash build`](#flash-build) | Build application package |
Expand Down Expand Up @@ -60,6 +61,51 @@ flash <command> --help # Show help for specific command

---

## flash login

Authenticate with Runpod. Opens a browser for authentication and saves credentials locally.

### Syntax

```bash
flash login
```

### What It Does

1. Opens your default browser to Runpod's authentication page
2. After you authenticate, saves credentials securely
3. Environment variables persist across sessions

### Examples

**Authenticate with Runpod:**
```bash
flash login
# Opens browser for authentication
```

### Alternative: Manual Configuration

If `flash login` doesn't work in your environment, you can set the API key manually:

```bash
# Set environment variable
export RUNPOD_API_KEY=your-key-here

# Or add to .env file
echo "RUNPOD_API_KEY=your-key-here" > .env
```

Get your API key from [Runpod Settings](https://www.runpod.io/console/user/settings).

### Related Commands

- [`flash run`](#flash-run) - Run development server (requires authentication)
- [`flash deploy`](#flash-deploy) - Deploy to Runpod (requires authentication)

---

## flash init

Create a new Flash project with the correct structure and boilerplate code.
Expand Down
Loading